name: Test Docs

on:
  pull_request:
    paths:
      - 'docs/**'
      - '.github/workflows/*docs.yml'

jobs:
  test-docs:
    name: Test Docusaurus build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-node@v6
        with:
          node-version-file: 'docs/.nvmrc'
      - name: Install dependencies
        working-directory: ./docs
        run: npm install
      - name: Build
        working-directory: ./docs
        run: npm run build
