Skip to content

Commit 4afcb13

Browse files
committed
Updated GitHub yaml
1 parent 4ed32ab commit 4afcb13

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

.github/workflows/hugo.yml

Lines changed: 17 additions & 9 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,28 +32,34 @@ jobs:
3032
build:
3133
runs-on: ubuntu-latest
3234
env:
33-
HUGO_VERSION: 0.102.3
35+
HUGO_VERSION: 0.134.2
3436
steps:
3537
- name: Install Hugo CLI
3638
run: |
37-
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.deb \
38-
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
39+
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
42+
run: sudo snap install dart-sass
3943
- name: Checkout
4044
uses: actions/checkout@v4
4145
with:
4246
submodules: recursive
47+
fetch-depth: 0
4348
- name: Setup Pages
4449
id: pages
4550
uses: actions/configure-pages@v5
51+
- name: Install Node.js dependencies
52+
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
4653
- name: Build with Hugo
4754
env:
48-
# For maximum backward compatibility with Hugo modules
55+
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
4956
HUGO_ENVIRONMENT: production
50-
HUGO_ENV: production
57+
TZ: America/Los_Angeles
5158
run: |
5259
hugo \
60+
--gc \
5361
--minify \
54-
--baseURL "${{ steps.pages.outputs.base_url }}/"
62+
--baseURL "${{ steps.pages.outputs.base_url }}/"
5563
- name: Upload artifact
5664
uses: actions/upload-pages-artifact@v3
5765
with:

0 commit comments

Comments
 (0)