name: Docs

on: [push, pull_request]

jobs:
  docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5

      - name: Set up Python
        uses: actions/setup-python@v6
        with:
          python-version: '3.12'
          cache: 'pip'
          cache-dependency-path: 'docs/requirements.txt'

      - name: Install dependencies
        run: pip install -r docs/requirements.txt

      - name: Build docs
        run: |
          cd docs
          make html
