Skip to content

Commit

Permalink
Pin Hugo version in GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
yanirs committed Feb 26, 2024
1 parent dd701e6 commit 6db4004
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
branches:
- master
pull_request:
workflow_dispatch:

jobs:
deploy:
Expand All @@ -18,7 +19,11 @@ jobs:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod

- name: Install Hugo
run: sudo snap install hugo
env:
HUGO_VERSION: 0.123.0
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Build production site
run: hugo --minify
Expand All @@ -30,7 +35,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public

# The following steps aren't essentially, but useful for debugging and viewing a human-friendly diff.
# The following steps aren't essential, but useful for debugging and viewing a human-friendly diff.
- name: Rebuild site without minification (master only)
if: github.ref == 'refs/heads/master'
run: hugo --destination ./public-unminified
Expand Down

0 comments on commit 6db4004

Please sign in to comment.