Skip to content

Build and validate documentation #133

Build and validate documentation

Build and validate documentation #133

Workflow file for this run

name: Documentation Build
run-name: Build and validate documentation
on:
schedule:
- cron: '0 0 * * *' # Daily at 12 AM UTC
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}
cancel-in-progress: true
jobs:
docs-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [22]
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: 'docs/package-lock.json'
- name: Cache node_modules
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
id: cache-node-modules
with:
path: docs/node_modules
key: ${{ runner.os }}-node-${{ matrix.node-version }}-modules-${{ hashFiles('docs/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node-version }}-modules-
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
working-directory: docs
run: npm ci
- name: Generate API documentation
working-directory: docs
run: npm run gen-api-docs all
- name: Build documentation
working-directory: docs
run: npm run build
- name: Upload build artifacts
if: success()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: docs-build
path: docs/build/
retention-days: 7