Skip to content

Build hugo site

Build hugo site #22

Workflow file for this run

name: Build hugo site
on:
push:
branches: [ main ]
paths-ignore:
- ".github/**"
- ".README"
workflow_run:
workflows: ["Update release notes"]
types:
- completed
jobs:
build-site:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: true
fetch-depth: 1
- name: Setup Hugo
uses: peaceiris/actions-hugo@16361eb4acea8698b220b76c0d4e84e1fd22c61d # 2.6.0
with:
hugo-version: 'latest'
extended: true
- name: Build with Hugo
run: hugo --environment production -F --minify
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # 3.9.3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public