File tree Expand file tree Collapse file tree 2 files changed +71
-40
lines changed Expand file tree Collapse file tree 2 files changed +71
-40
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Deploy Hugo site to Pages
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ workflow_dispatch :
9+
10+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
11+ permissions :
12+ contents : read
13+ pages : write
14+ id-token : write
15+
16+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
17+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
18+ concurrency :
19+ group : " pages"
20+ cancel-in-progress : false
21+
22+ # Default to bash
23+ defaults :
24+ run :
25+ shell : bash
26+
27+ jobs :
28+ build :
29+ runs-on : ubuntu-latest
30+ steps :
31+ - uses : actions/checkout@v4
32+ with :
33+ submodules : recursive
34+ fetch-depth : 0
35+
36+ - name : Setup Go
37+ uses : actions/setup-go@v5
38+ with :
39+ go-version : ' 1.23'
40+
41+ - name : Setup Hugo
42+ uses : peaceiris/actions-hugo@v3
43+ with :
44+ hugo-version : " latest"
45+ extended : true
46+
47+ - name : Build
48+ env :
49+ # For maximum backward compatibility with Hugo modules
50+ HUGO_ENVIRONMENT : production
51+ HUGO_ENV : production
52+ run : |
53+ hugo \
54+ --gc --minify \
55+ --baseURL "${{ steps.pages.outputs.base_url }}/"
56+
57+ - name : Upload artifact
58+ uses : actions/upload-pages-artifact@v3
59+ with :
60+ path : ./public
61+
62+ deploy :
63+ runs-on : ubuntu-latest
64+ needs : build
65+ environment :
66+ name : github-pages
67+ url : ${{ steps.deployment.outputs.page_url }}
68+ steps :
69+ - name : Deploy to GitHub Pages
70+ id : deployment
71+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments