Skip to content

Commit 633dee5

Browse files
authored
Update hugo.yml
1 parent c7ddf13 commit 633dee5

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

.github/workflows/hugo.yml

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

910
# Allows you to run this workflow manually from the Actions tab
1011
workflow_dispatch:
@@ -15,10 +16,11 @@ permissions:
1516
pages: write
1617
id-token: write
1718

18-
# Allow one concurrent deployment
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.
1921
concurrency:
2022
group: "pages"
21-
cancel-in-progress: true
23+
cancel-in-progress: false
2224

2325
# Default to bash
2426
defaults:
@@ -30,34 +32,36 @@ jobs:
3032
build:
3133
runs-on: ubuntu-latest
3234
env:
33-
HUGO_VERSION: 0.108.0
35+
HUGO_VERSION: 0.128.0
3436
steps:
3537
- name: Install Hugo CLI
3638
run: |
3739
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
38-
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
39-
- name: Install Dart Sass Embedded
40-
run: sudo snap install dart-sass-embedded
40+
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
41+
- name: Install Dart Sass
42+
run: sudo snap install dart-sass
4143
- name: Checkout
42-
uses: actions/checkout@v3
44+
uses: actions/checkout@v4
4345
with:
4446
submodules: recursive
47+
fetch-depth: 0
4548
- name: Setup Pages
4649
id: pages
47-
uses: actions/configure-pages@v3
50+
uses: actions/configure-pages@v5
4851
- name: Install Node.js dependencies
4952
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
5053
- name: Build with Hugo
5154
env:
52-
# For maximum backward compatibility with Hugo modules
55+
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
5356
HUGO_ENVIRONMENT: production
54-
HUGO_ENV: production
57+
TZ: America/Los_Angeles
5558
run: |
5659
hugo \
60+
--gc \
5761
--minify \
58-
--baseURL "${{ steps.pages.outputs.base_url }}/"
62+
--baseURL "${{ steps.pages.outputs.base_url }}/"
5963
- name: Upload artifact
60-
uses: actions/upload-pages-artifact@v1
64+
uses: actions/upload-pages-artifact@v3
6165
with:
6266
path: ./public
6367

@@ -71,4 +75,5 @@ jobs:
7175
steps:
7276
- name: Deploy to GitHub Pages
7377
id: deployment
74-
uses: actions/deploy-pages@v1
78+
uses: actions/deploy-pages@v4
79+

0 commit comments

Comments
 (0)