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 : Deploy Hugo site to Pages
2+
3+ on :
4+ push :
5+ branches : ["master"]
6+ workflow_dispatch :
7+
8+ permissions :
9+ contents : read
10+ pages : write
11+ id-token : write
12+
13+ concurrency :
14+ group : " pages"
15+ cancel-in-progress : true
16+
17+ jobs :
18+ build :
19+ runs-on : ubuntu-latest
20+ steps :
21+ - name : Checkout
22+ uses : actions/checkout@v4
23+ with :
24+ fetch-depth : 0
25+
26+ - name : Setup Pages
27+ id : pages
28+ uses : actions/configure-pages@v5
29+
30+ - name : Setup Hugo
31+ uses : peaceiris/actions-hugo@v3
32+ with :
33+ hugo-version : " 0.147.2"
34+ extended : true
35+
36+ - name : Build
37+ run : |
38+ hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
39+ ls -la public | head -n 50
40+ test -f public/index.html
41+
42+ - name : Upload artifact
43+ uses : actions/upload-pages-artifact@v3
44+ with :
45+ path : ./public
46+
47+ deploy :
48+ runs-on : ubuntu-latest
49+ needs : build
50+ environment :
51+ name : github-pages
52+ url : ${{ steps.deployment.outputs.page_url }}
53+ steps :
54+ - name : Deploy to GitHub Pages
55+ id : deployment
56+ uses : actions/deploy-pages@v4
57+
You can’t perform that action at this time.
0 commit comments