Skip to content

Commit 2b4b11f

Browse files
committed
updated actions
1 parent ab64713 commit 2b4b11f

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

.github/workflows/hugo.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,30 +31,32 @@ jobs:
3131
build:
3232
runs-on: ubuntu-latest
3333
env:
34-
HUGO_VERSION: 0.128.0
34+
HUGO_VERSION: 0.132.2
3535
steps:
36-
- name: Install Hugo CLI
37-
run: |
38-
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
39-
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
40-
- name: Install Dart Sass
41-
run: sudo snap install dart-sass
4236
- name: Checkout
4337
uses: actions/checkout@v4
4438
with:
39+
fetch-depth: 0 # fetch all history for .GitInfo and .Lastmod
4540
submodules: recursive
41+
- name: Setup Go
42+
uses: actions/setup-go@v5
43+
with:
44+
go-version: '1.22'
4645
- name: Setup Pages
4746
id: pages
48-
uses: actions/configure-pages@v5
49-
- name: Install Node.js dependencies
50-
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
47+
uses: actions/configure-pages@v4
48+
- name: Setup Hugo
49+
run: |
50+
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
51+
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
5152
- name: Build with Hugo
5253
env:
53-
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
54+
# For maximum backward compatibility with Hugo modules
5455
HUGO_ENVIRONMENT: production
56+
HUGO_ENV: production
5557
run: |
5658
hugo \
57-
--minify \
59+
--gc --minify \
5860
--baseURL "${{ steps.pages.outputs.base_url }}/"
5961
- name: Upload artifact
6062
uses: actions/upload-pages-artifact@v3

0 commit comments

Comments
 (0)