name: Docs
on:
push:
branches: ["master", "docs"] paths:
- "docs/**"
- ".github/workflows/docs.yml"
pull_request:
paths:
- "docs/**"
- ".github/workflows/docs.yml"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: "25"
cache: npm
cache-dependency-path: docs/package-lock.json
- name: Setup Pages
id: pages
uses: actions/configure-pages@v6
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
env:
PAGES_BASE_PATH: ${{ steps.pages.outputs.base_path }}
- name: Upload artifact
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/docs') && github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v4
with:
path: docs/out
include-hidden-files: true
deploy:
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/docs') && github.event_name != 'pull_request'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5