name: Build docs

on:
  push:
  pull_request:
    paths:
      - docs/**
      - py/**
      - tests/cpydiff/**

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

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v7
    - uses: actions/setup-python@v7
    - name: Install Python packages
      run: pip install -r docs/requirements.txt
    - name: Build unix port
      run: tools/ci.sh unix_build_helper
    - name: Build docs
      run: make -C docs/ html
