File tree Expand file tree Collapse file tree 1 file changed +66
-0
lines changed
Expand file tree Collapse file tree 1 file changed +66
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Hugo
2+
3+ on :
4+ push :
5+ branches : ["main"]
6+
7+ workflow_dispatch :
8+
9+ permissions :
10+ contents : read
11+ pages : write
12+ id-token : write
13+
14+ concurrency :
15+ group : " pages"
16+ cancel-in-progress : false
17+
18+ defaults :
19+ run :
20+ shell : bash
21+
22+ jobs :
23+ build :
24+ runs-on : ubuntu-latest
25+ env :
26+ HUGO_VERSION : 0.128.0
27+ steps :
28+ - name : Setup Hugo
29+ uses : peaceiris/actions-hugo@v2
30+ with :
31+ hugo-version : ${{ env.HUGO_VERSION }}
32+ extended : true
33+ - name : Install Dart Sass
34+ run : sudo snap install dart-sass
35+ - name : Checkout
36+ uses : actions/checkout@v4
37+ with :
38+ submodules : recursive
39+ - name : Setup Pages
40+ id : pages
41+ uses : actions/configure-pages@v5
42+ - name : Install Node.js dependencies
43+ run : " [[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
44+ - name : Build with Hugo
45+ env :
46+ HUGO_CACHEDIR : ${{ runner.temp }}/hugo_cache
47+ HUGO_ENVIRONMENT : production
48+ run : |
49+ hugo \
50+ --minify \
51+ --baseURL "${{ steps.pages.outputs.base_url }}/"
52+ - name : Upload artifact
53+ uses : actions/upload-pages-artifact@v3
54+ with :
55+ path : ./public
56+
57+ deploy :
58+ environment :
59+ name : github-pages
60+ url : ${{ steps.deployment.outputs.page_url }}
61+ runs-on : ubuntu-latest
62+ needs : build
63+ steps :
64+ - name : Deploy to GitHub Pages
65+ id : deployment
66+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments