Skip to content

chore: update pre-commit configuration to exclude test_pixiq.py and b… #19

chore: update pre-commit configuration to exclude test_pixiq.py and b…

chore: update pre-commit configuration to exclude test_pixiq.py and b… #19

Workflow file for this run

name: Documentation
on:
push:
branches: [main]
paths:
- 'docs/**'
- 'mkdocs.yml'
- 'pyproject.toml'
- '.github/workflows/docs.yml'
pull_request:
branches: [main]
paths:
- 'docs/**'
- 'mkdocs.yml'
- 'pyproject.toml'
- '.github/workflows/docs.yml'
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true
- name: Set up Python
run: uv python install
- name: Install documentation dependencies
run: uv sync --group docs
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Build documentation
run: |
uv run mkdocs build --clean --strict
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./site
# Deployment job (only on main branch)
deploy:
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
# Build check job for PRs
check:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
needs: build
steps:
- name: Documentation build successful
run: echo "Documentation built successfully for PR"