Skip to content

GitHub Pages

GitHub Pages #3

Workflow file for this run

# .github/workflows/gh-pages.yml
name: GitHub Pages
on:
workflow_dispatch:
push:
branches:
- main
paths:
- docs/**
permissions:
contents: read
pages: write
jobs:
build-deploy:
runs-on: ubuntu-latest
env:
HUGO_VERSION: “0.127.0"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "latest"
extended: true
- name: Build
working-directory: ./docs
run: hugo --minify --gc --baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./docs/public