Skip to content

Commit

Permalink
Add validation step for Hugo
Browse files Browse the repository at this point in the history
  • Loading branch information
phillebaba committed Jan 2, 2025
1 parent 1c5e94c commit f093097
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Validate Hugo site

on: pull_request

defaults:
run:
shell: bash

jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.140.1
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Setup Hugo
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 with Hugo
env:
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo --gc --minify --baseURL "${{ steps.pages.outputs.base_url }}/"

0 comments on commit f093097

Please sign in to comment.