name: Docs website

on:
  pull_request:
    paths:
      - "docs/**"
      - "Makefile"
      - "config.mk"
      - "make/**"
      - ".github/workflows/docs.yml"
  push:
    branches:
      - master
    paths:
      - "docs/**"
      - "Makefile"
      - "config.mk"
      - "make/**"
      - ".github/workflows/docs.yml"

permissions:
  contents: read

concurrency:
  group: docs-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

jobs:
  quality:
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
          node-version: "22"
          cache: npm
          cache-dependency-path: docs/package-lock.json

      - name: Check documentation website
        run: make check-docs
