Skip to content

Commit 4413a3f

Browse files
committed
Update Pages workflow for Node build and GH Pages v4
Switch to Node-based build process, enable Hugo extended, update to peaceiris/actions-gh-pages v4, and set custom domain.
1 parent e239cf2 commit 4413a3f

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

.github/workflows/pages.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,30 @@ jobs:
1919
submodules: true
2020
fetch-depth: 0
2121

22-
- name: Setup Hugo
23-
uses: peaceiris/actions-hugo@v3
24-
with:
25-
hugo-version: "latest"
26-
2722
- uses: actions/cache@v4
2823
with:
2924
path: ${{ env.HUGO_CACHEDIR }} # <- Use the same env variable just right here
3025
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }}
3126
restore-keys: |
3227
${{ runner.os }}-hugomod-
3328
34-
- name: Build
35-
run: hugo --minify
29+
- name: Setup Hugo
30+
uses: peaceiris/actions-hugo@v3
31+
with:
32+
hugo-version: 'latest'
33+
extended: true
34+
35+
- name: Setup Node
36+
uses: actions/setup-node@v6
37+
- run: npm install
38+
- run: npm run build:production
39+
# - name: Build
40+
# run: hugo --minify
3641

3742
- name: Deploy
38-
uses: peaceiris/actions-gh-pages@v3
43+
uses: peaceiris/actions-gh-pages@v4
3944
if: github.ref == 'refs/heads/main'
4045
with:
4146
github_token: ${{ secrets.GITHUB_TOKEN }}
4247
publish_dir: ./public
48+
cname: https://www.swanlake.io

0 commit comments

Comments
 (0)