name: Build Documentation

on:
  pull_request:
    branches:
      - master
  workflow_dispatch:

permissions: {}

jobs:
  build-documentation:
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v4.1.7
      - name: Install Python
        uses: actions/setup-python@v5.2.0
        with:
          cache: 'pip'
          check-latest: true
          python-version: '3.12'
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip setuptools wheel
          pip install -r requirements-docs.txt
      - name: Build documentation
        env:
          SPHINXOPTS: -T -W --keep-going
        run: make -C docs html
