Skip to content

New Use Cases

New Use Cases #131

Workflow file for this run

name: Build and Deploy Hugo Docs
on:
push:
branches:
- docs
paths:
- "**" # trigger on any change in docs branch (optional refine)
jobs:
build-deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: .
steps:
- name: Checkout docs branch
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: "0.152.2"
extended: true
- name: Build site
run: hugo --minify
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./public
keep_files: false