Skip to content

Commit 020f606

Browse files
committed
chore: update GitHub Actions workflow to latest versions
Update Hugo to 0.155.3, bump all actions to latest major versions, and remove unnecessary Dart Sass and Node.js steps.
1 parent e2de1eb commit 020f606

File tree

1 file changed

+5
-20
lines changed

1 file changed

+5
-20
lines changed

.github/workflows/hugo.yaml

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,44 @@
1-
# Sample workflow for building and deploying a Hugo site to GitHub Pages
21
name: Deploy Hugo site to Pages
32

43
on:
5-
# Runs on pushes targeting the default branch
64
push:
75
branches:
86
- main
9-
10-
# Allows you to run this workflow manually from the Actions tab
117
workflow_dispatch:
128

13-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
149
permissions:
1510
contents: read
1611
pages: write
1712
id-token: write
1813

19-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
20-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2114
concurrency:
2215
group: "pages"
2316
cancel-in-progress: false
2417

25-
# Default to bash
2618
defaults:
2719
run:
2820
shell: bash
2921

3022
jobs:
31-
# Build job
3223
build:
3324
runs-on: ubuntu-latest
3425
env:
35-
HUGO_VERSION: 0.123.7
26+
HUGO_VERSION: 0.155.3
3627
steps:
3728
- name: Install Hugo CLI
3829
run: |
3930
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
4031
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
41-
- name: Install Dart Sass
42-
run: sudo snap install dart-sass
4332
- name: Checkout
44-
uses: actions/checkout@v4
33+
uses: actions/checkout@v6
4534
with:
4635
submodules: recursive
4736
fetch-depth: 0
4837
- name: Setup Pages
4938
id: pages
50-
uses: actions/configure-pages@v4
51-
- name: Install Node.js dependencies
52-
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
39+
uses: actions/configure-pages@v5
5340
- name: Build with Hugo
5441
env:
55-
# For maximum backward compatibility with Hugo modules
5642
HUGO_ENVIRONMENT: production
5743
HUGO_ENV: production
5844
run: |
@@ -61,11 +47,10 @@ jobs:
6147
--minify \
6248
--baseURL "${{ steps.pages.outputs.base_url }}/"
6349
- name: Upload artifact
64-
uses: actions/upload-pages-artifact@v2
50+
uses: actions/upload-pages-artifact@v4
6551
with:
6652
path: ./public
6753

68-
# Deployment job
6954
deploy:
7055
environment:
7156
name: github-pages
@@ -75,4 +60,4 @@ jobs:
7560
steps:
7661
- name: Deploy to GitHub Pages
7762
id: deployment
78-
uses: actions/deploy-pages@v3
63+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)