Skip to content

Merge pull request #69 from isaaclins/fix/reaper-api-body #34

Merge pull request #69 from isaaclins/fix/reaper-api-body

Merge pull request #69 from isaaclins/fix/reaper-api-body #34

Workflow file for this run

# Build Hugo and publish the production site to the gh-pages branch.
name: pages-deploy
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
concurrency:
group: pages-deploy
cancel-in-progress: false
defaults:
run:
shell: bash
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: recursive
fetch-depth: 0
- name: Read Hugo version
run: |
HUGO_VERSION="$(tr -d '[:space:]' < .hugo-version)"
if [[ ! "$HUGO_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "::error::Invalid Hugo version in .hugo-version: $HUGO_VERSION"
exit 1
fi
echo "HUGO_VERSION=$HUGO_VERSION" >> "$GITHUB_ENV"
- name: Install Hugo CLI
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: Verify Hugo Version
run: hugo version
- name: Enforce Hugo minimum version
run: python3 scripts/check-hugo-version.py
- name: Install Dart Sass
run: sudo snap install dart-sass
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Build with Hugo
env:
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo --gc --minify --baseURL "https://isaaclins.com/"
- name: Publish production site
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ github.token }}
branch: gh-pages
folder: ./public
clean-exclude: pr-preview/
single-commit: false
force: false