Skip to content

Release(hugo): GitHub Pages #63

Release(hugo): GitHub Pages

Release(hugo): GitHub Pages #63

Workflow file for this run

name: 'Release(hugo): GitHub Pages'
on:
release:
types: [published]
workflow_dispatch:
env:
HUGO_DIR: 'docs/hugo'
jobs:
gh-pages:
runs-on: ubuntu-latest
timeout-minutes: 10
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
defaults:
run:
working-directory: ${{ env.HUGO_DIR }}
steps:
- uses: actions/checkout@v5
with:
lfs: true
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '^1.23'
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.144.2'
extended: true
- name: Get hugo dependencies (theme)
run: hugo mod get
- name: Build
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: docs/hugo/public