name: Docs

on:
  pull_request:
    paths:
      - "**/*.md"
      - ".github/ISSUE_TEMPLATE/**"
      - ".github/PULL_REQUEST_TEMPLATE.md"
      - ".github/workflows/docs.yml"
      - "scripts/check_docs.py"
  push:
    branches: [main]
    paths:
      - "**/*.md"
      - ".github/ISSUE_TEMPLATE/**"
      - ".github/PULL_REQUEST_TEMPLATE.md"
      - ".github/workflows/docs.yml"
      - "scripts/check_docs.py"

permissions:
  contents: read

concurrency:
  group: docs-${{ github.ref }}
  cancel-in-progress: true

jobs:
  links:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6

      - name: Validate Markdown docs
        run: make docs-check
