File tree Expand file tree Collapse file tree 2 files changed +98
-0
lines changed Expand file tree Collapse file tree 2 files changed +98
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI Pipeline
2+ # Produces production artifact, uploads it as workflow artifact
3+
4+ on :
5+ push :
6+ branches : [source]
7+ paths-ignore :
8+ - ' **.md'
9+
10+ pull_request :
11+ branches : [source]
12+ paths-ignore :
13+ - ' **.md'
14+
15+ # allows this workflow to be run from another
16+ workflow_call :
17+
18+ # allows running this workflow manually from the Actions tab
19+ workflow_dispatch :
20+
21+ jobs :
22+ build :
23+ name : Build
24+ runs-on : ' ubuntu-22.04'
25+ steps :
26+ - name : 🛫 Checkout
27+ uses : actions/checkout@v4
28+ with :
29+ persist-credentials : false
30+
31+ - name : 🧶 Setup Node
32+ uses : actions/setup-node@v4
33+ with :
34+ node-version-file : ' package.json'
35+ cache : ' npm'
36+
37+ - name : 👩🔧 Install dependencies
38+ run : npm clean-install
39+
40+ - name : 📦 Build for production
41+ id : build_step
42+ run : npm run production 2>&1 | tee build-output.log
43+
44+ - name : 📤 Upload Pages artifact
45+ uses : actions/upload-pages-artifact@v3
46+ # only run if on source branch or on a tag
47+ if : ${{ github.ref == 'refs/heads/source' || startsWith( github.ref, 'refs/tags/' )}}
48+ with :
49+ path : dist/
50+
51+ - name : 📝 Generate workflow summary
52+ run : |
53+ echo "### 📦 Webpack Build Summary" >> $GITHUB_STEP_SUMMARY
54+ echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
55+ sed -r "s/\x1B\[[0-9;]*[mK]//g" build-output.log >> $GITHUB_STEP_SUMMARY
56+ echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
Original file line number Diff line number Diff line change 1+ name : Deploy to GitHub Pages
2+
3+ on :
4+ release :
5+ types : [ 'published' ]
6+
7+ # allows running this workflow manually from the Actions tab
8+ workflow_dispatch :
9+
10+ permissions :
11+ contents : read # required for git checkout
12+ pages : write # to deploy to GitHub Pages
13+ id-token : write # to verify the deployment originates from an appropriate source
14+ actions : write # required to write a job summary
15+
16+ jobs :
17+ ci :
18+ name : 🚀 CI
19+ uses : ./.github/workflows/ci.yaml
20+ permissions :
21+ contents : read
22+ actions : write # required to write a job summary
23+
24+ # Deploys Pages artifact to GitHub Pages.
25+ deploy-pages-artifact :
26+ name : Deploy Pages Artifact to GitHub Pages
27+ needs : ci
28+ # Deploy to github-pages environment
29+ environment :
30+ name : github-pages
31+ url : ${{ steps.deployment.outputs.page_url }}
32+ runs-on : ' ubuntu-24.04'
33+ steps :
34+ # Deploy the artifact from the 'ci' job
35+ - name : 🚀 Deploy to GitHub Pages
36+ id : deployment
37+ uses : actions/deploy-pages@v4
38+
39+ - name : 📝 Generate deployment summary
40+ run : |
41+ echo "### 🚀 Deployment Summary" >> $GITHUB_STEP_SUMMARY
42+ echo "Website deployed to: ${{ steps.deployment.outputs.page_url }}" >> $GITHUB_STEP_SUMMARY
You can’t perform that action at this time.
0 commit comments