Skip to content

Commit

Permalink
Merge pull request #8 from skrysmanski/feature/specific-hugo-version
Browse files Browse the repository at this point in the history
Add support for use of old Hugo versions
  • Loading branch information
skrysmanski authored Feb 20, 2024
2 parents 5ca84e9 + 1999a07 commit b13d501
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/build-and-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,23 @@ jobs:
# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
runs-on: ubuntu-latest

# Use this to pin the Hugo version, if necessary.
env:
HUGO_VERSION: 0.122.0

steps:
- name: Install Hugo CLI
- name: Install Hugo CLI (latest)
if: ${{ !env.HUGO_VERSION }}
run: sudo snap install hugo

- name: Install Hugo CLI (specific)
if: ${{ env.HUGO_VERSION }}
# NOTE: "snap" doesn't support installing old versions, if they're not provided by the package authors.
# This snippet is taken from: https://gohugo.io/hosting-and-deployment/hosting-on-github/
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
# See: https://github.com/actions/setup-node
- name: Setup NodeJS environment
uses: actions/setup-node@v4
Expand Down

0 comments on commit b13d501

Please sign in to comment.