name: SDD

on:
  pull_request:
  push:
    branches:
      - main

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: dtolnay/rust-toolchain@stable
      - uses: actions/setup-node@v5
        with:
          node-version: 22
          cache: npm
          cache-dependency-path: docs-site/package-lock.json
      - name: Run SDD validation
        run: cargo run --quiet -- ci
      - name: Run docs validation
        working-directory: docs-site
        run: |
          npm ci
          npm run docs:generate -- --check
          npm run docs:links
          npm run build
