Skip to content

Commit 57cc637

Browse files
committed
ci(site): add GitHub Actions workflow for Hugo build and deploy
1 parent 974e318 commit 57cc637

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

.github/workflows/hugo.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Deploy Hugo site to Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
submodules: recursive
25+
26+
- name: Setup Hugo
27+
uses: peaceiris/actions-hugo@v3
28+
with:
29+
hugo-version: '0.159.0'
30+
extended: true
31+
32+
- name: Install Dart Sass
33+
run: sudo snap install dart-sass
34+
35+
- name: Build
36+
run: hugo --minify
37+
38+
- name: Upload artifact
39+
uses: actions/upload-pages-artifact@v3
40+
with:
41+
path: ./public
42+
43+
deploy:
44+
needs: build
45+
runs-on: ubuntu-latest
46+
environment: github-pages
47+
permissions:
48+
pages: write
49+
id-token: write
50+
steps:
51+
- name: Deploy to GitHub Pages
52+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)