Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/hugo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Deploy documentation to GitHub Pages

on:
push:
branches: ["main"]
paths:
- "docs/**"
- ".github/workflows/hugo.yml"
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: "latest"
hugo-extended: true

- name: Get Hugo modules
working-directory: docs
run: hugo mod get -u

- name: Build site
working-directory: docs
env:
# GA ID from repo secret GA_MEASUREMENT_ID (never commit the ID)
HUGO_SERVICES_GOOGLEANALYTICS_ID: ${{ secrets.GA_MEASUREMENT_ID }}
run: hugo --minify --environment production

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/public

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

# Hugo
docs/public/
docs/resources/_gen/
Loading
Loading