File tree Expand file tree Collapse file tree 2 files changed +54
-0
lines changed
Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build from push
2+ on :
3+ push :
4+ branches :
5+ - main
6+
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+ env :
11+ HUGO_VERSION : 0.141.0
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v4
15+ with :
16+ submodules : recursive
17+ fetch-depth : 0
18+ - name : Build site
19+ uses : omsf/static-site-tools/build/hugo@main
20+ with :
21+ base-url : " "
22+
23+ - name : Make artifact
24+ shell : bash
25+ run : tar czf site.tar.gz public
26+
27+ - name : Upload build artifact
28+ uses : actions/upload-artifact@v4
29+ with :
30+ name : site-build
31+ path : site.tar.gz
32+ if-no-files-found : error
33+ retention-days : 1
Original file line number Diff line number Diff line change 1+ name : Deploy to production
2+
3+ on :
4+ workflow_run :
5+ workflows : ["Build from push"]
6+ types :
7+ - completed
8+ branches :
9+ - main
10+
11+ jobs :
12+ deploy-to-prod :
13+ if : ${{ github.event.workflow_run.conclusion == 'success' }}
14+ uses : omsf/static-site-tools/.github/workflows/prod-cloudflare.yaml@main
15+ with :
16+ run-id : ${{ github.event.workflow_run.id }}
17+ project-name : ${{ vars.CLOUDFLARE_PROJECT_NAME }}
18+ html-dir : public
19+ secrets :
20+ CLOUDFLARE_API_TOKEN : ${{ secrets.CLOUDFLARE_API_TOKEN }}
21+ CLOUDFLARE_ACCOUNT_ID : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
You can’t perform that action at this time.
0 commit comments