11name : Build Pipeline # A Build Pipeline which will use for build, test and deploy.
22
33on :
4- push : # When we push the changes.
5- branches : # Only for these branches.
4+ push : # When we push the changes.
5+ branches : # Only for these branches.
66 - master
77 - bugfix/*
88 - hotfix/*
99 - release/*
10- paths-ignore : # Ignoring the markdown file changes.
11- - " **/*.md"
12- pull_request : # Also on pull request events.
13- workflow_dispatch : # Allows you to run this workflow manually from the Actions tab.
10+ paths-ignore : # Ignoring the markdown file changes.
11+ - ' **/*.md'
12+ pull_request : # Also on pull request events.
13+ workflow_dispatch : # Allows you to run this workflow manually from the Actions tab.
1414
1515jobs :
16- build : # Job named 'build'
17- runs-on : ubuntu-latest # The type of machine to run the job on.
16+ build : # Job named 'build'
17+ runs-on : ubuntu-latest # The type of machine to run the job on.
1818
19- strategy : # Allows you to create a matrix for job configuration.
19+ strategy : # Allows you to create a matrix for job configuration.
2020 matrix :
21- node-version : [ 18.x, 19.x, 20.x ] # Running tests across different environments.
21+ node-version : [18.x, 19.x, 20.x] # Running tests across different environments.
2222 # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2323
24- steps : # The sequence of tasks that make up a job.
24+ steps : # The sequence of tasks that make up a job.
2525 - name : Checking out repository code
26- uses :
actions/[email protected] # Action for checking out a repo. 26+ uses :
actions/[email protected] # Action for checking out a repo. 2727
2828 - name : Setup Node.js ${{ matrix.node-version }} Environment
29- uses :
actions/[email protected] # Action for setting up Node environment. 29+ uses :
actions/[email protected] # Action for setting up Node environment. 3030 with :
3131 node-version : ${{ matrix.node-version }}
3232
3333 - name : Install pnpm package manager
34- uses :
pnpm/[email protected] # Action for setting up pnpm. 34+ uses :
pnpm/[email protected] # Action for setting up pnpm. 3535 id : pnpm-install
3636 with :
3737 version : ^8
@@ -43,19 +43,19 @@ jobs:
4343 echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
4444
4545 - name : Cache pnpm Store
46- uses :
actions/[email protected] # Action provides caching dependencies and build outputs to improve workflow execution time. 46+ uses :
actions/[email protected] # Action provides caching dependencies and build outputs to improve workflow execution time. 4747 with :
48- path : ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} # The path of the directory to cache.
49- key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} # An explicit key for restoring and saving the cache.
48+ path : ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} # The path of the directory to cache.
49+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} # An explicit key for restoring and saving the cache.
5050 restore-keys : |
5151 ${{ runner.os }}-pnpm-store-
5252
5353 - name : Install project dependencies
54- run : pnpm install # Install all project dependencies.
54+ run : pnpm install # Install all project dependencies.
5555
5656 - name : Build & export the App
57- run : pnpm run build # Builds the app and exports it.
57+ run : pnpm run build # Builds the app and exports it.
5858
59- concurrency : # Allows controlling the concurrency level of the job in the build pipeline.
59+ concurrency : # Allows controlling the concurrency level of the job in the build pipeline.
6060 group : ${{ github.workflow }}-${{ github.ref }}
61- cancel-in-progress : true # If enabled, previous runs of this workflow for the same group-key will be cancelled while this build or run is in progress.
61+ cancel-in-progress : true # If enabled, previous runs of this workflow for the same group-key will be cancelled while this build or run is in progress.
0 commit comments