Documentation

GitHub Pages Deployment

Publish generated documentation to GitHub Pages with the official Pages actions.

Repository setting

In GitHub, open Settings, then Pages, and set Source to GitHub Actions.

Deployment workflow

Generate into _site, upload the Pages artifact, then deploy it.

name: Deploy docs
on:
  push:
    branches: [main]
  workflow_dispatch:
permissions:
  contents: read
  pages: write
  id-token: write
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 24
          cache: npm
      - run: npm ci
      - run: npm run docs:pages
      - uses: actions/upload-pages-artifact@v3
        with:
          path: _site
  deploy:
    needs: build
    runs-on: ubuntu-latest
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    steps:
      - id: deployment
        uses: actions/deploy-pages@v4