name: documentation

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

permissions:
  contents: read

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: '3.12'

      - run: |
          python -m pip install --upgrade pip
          pip install uv
          uv pip install -r pyproject.toml --system --all-extras

      - run: pdoc --docformat numpy --math --footer-text "© Copyright 2024-2025, Alex Plakantonakis." abstochkin -o ./docs

      - uses: actions/upload-pages-artifact@v3
        with:
          path: docs/