Skip to content

Commit bcfcd59

Browse files
committed
Update workflow
1 parent 4a63380 commit bcfcd59

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

.github/workflows/hugo.yaml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ name: Deploy Hugo site to Pages
44
on:
55
# Runs on pushes targeting the default branch
66
push:
7-
branches:
8-
- main
7+
branches: ["main"]
98

109
# Allows you to run this workflow manually from the Actions tab
1110
workflow_dispatch:
@@ -32,34 +31,31 @@ jobs:
3231
build:
3332
runs-on: ubuntu-latest
3433
env:
35-
HUGO_VERSION: 0.111.3
34+
HUGO_VERSION: 0.128.0
3635
steps:
3736
- name: Install Hugo CLI
3837
run: |
3938
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
40-
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
41-
- name: Install Dart Sass Embedded
42-
run: sudo snap install dart-sass-embedded
39+
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
40+
- name: Install Dart Sass
41+
run: sudo snap install dart-sass
4342
- name: Checkout
44-
uses: actions/checkout@v3
43+
uses: actions/checkout@v4
4544
with:
4645
submodules: recursive
47-
fetch-depth: 0
4846
- name: Setup Pages
4947
id: pages
50-
uses: actions/configure-pages@v3
48+
uses: actions/configure-pages@v5
5149
- name: Install Node.js dependencies
5250
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
5351
- name: Build with Hugo
5452
env:
55-
# For maximum backward compatibility with Hugo modules
53+
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
5654
HUGO_ENVIRONMENT: production
57-
HUGO_ENV: production
5855
run: |
5956
hugo \
60-
--gc \
6157
--minify \
62-
--baseURL "${{ steps.pages.outputs.base_url }}/"
58+
--baseURL "${{ steps.pages.outputs.base_url }}/"
6359
- name: Upload artifact
6460
uses: actions/upload-pages-artifact@v3
6561
with:
@@ -75,4 +71,4 @@ jobs:
7571
steps:
7672
- name: Deploy to GitHub Pages
7773
id: deployment
78-
uses: actions/deploy-pages@v2
74+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)