name: Test doc deployment

on:
  pull_request:
    branches:
      - dev
    paths:
      - ".github/workflows/test-docs.yml"
      - "doc/**"

jobs:
  test-deploy:
    name: Test deployment
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: doc
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 18
          cache: npm

      - name: Install dependencies
        run: npm ci
      - name: Test build website
        run: npm run build
