Skip to content

Update hugo

Update hugo #196

Workflow file for this run

# .github/workflows/preview.yml
name: Deploy PR previews
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
concurrency: preview-${{ github.ref }}
permissions:
pull-requests: write
# Default to bash
defaults:
run:
shell: bash
jobs:
# Build job
build-deploy:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.133.0
steps:
- 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: Install Dart Sass Embedded
run: sudo snap install dart-sass-embedded
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo \
--minify \
--baseURL "https://trailofbits.github.io/testing-handbook-preview/pr-preview/pr-${{ github.event.number }}/"
- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./public/
token: ${{ secrets.TESTING_HANDBOOK_PREVIEW_REPO }}
deploy-repository: trailofbits/testing-handbook-preview