File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Hugo Build and Deploy
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout code
13+ uses : actions/checkout@v4
14+
15+ - name : Setup Hugo
16+ uses : peaceiris/actions-hugo@v3
17+ with :
18+ hugo-version : latest # Or specify a version like 'v0.120.0'
19+ # extended: true # Set to true if using Hugo extended
20+
21+ - name : Build with Hugo
22+ run : hugo --destination public
23+
24+ - name : Upload artifact
25+ uses : actions/upload-pages-artifact@v4
26+ with :
27+ path : ./public
28+
29+ deploy :
30+ runs-on : ubuntu-latest
31+ needs : build
32+ permissions :
33+ pages : write
34+ id-token : write
35+ environment :
36+ name : github-pages
37+ url : ${{ steps.deployment.outputs.page_url }}
38+ steps :
39+ - name : Deploy to GitHub Pages
40+ id : deployment
41+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments