Skip to content

Merge pull request #12 from Apricot-S/develop #10

Merge pull request #12 from Apricot-S/develop

Merge pull request #12 from Apricot-S/develop #10

Workflow file for this run

name: Build documentation
on:
push:
branches:
- main
paths:
- docs/**
- src/**
- .github/workflows/docs.yml
pull_request:
branches:
- main
paths:
- docs/**
- src/**
- .github/workflows/docs.yml
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Create virtual environment
run: |
uv venv
echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH
echo "VIRTUAL_ENV=$GITHUB_WORKSPACE/.venv" >> $GITHUB_ENV
- name: Build wheel
run: uv build && uv sync --reinstall
- name: Build Python documentation
working-directory: docs
run: make clean html
- name: Deploy
uses: actions/upload-pages-artifact@v3
with:
path: docs/_build/html
deploy:
needs: build-docs
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4