Skip to content

Restructure project: uv packaging, ruff+ty, MkDocs Material docs, new… #1

Restructure project: uv packaging, ruff+ty, MkDocs Material docs, new…

Restructure project: uv packaging, ruff+ty, MkDocs Material docs, new… #1

Workflow file for this run

name: Docs
# Build the MkDocs Material site and deploy it to GitHub Pages.
# Pages source must be set to "GitHub Actions" in repo Settings → Pages.
on:
push:
branches: [main]
paths:
- "docs/**"
- "mkdocs.yml"
- "pyproject.toml"
- "examples/**"
- "CHANGELOG.md"
- ".github/workflows/docs.yml"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment; don't cancel an in-progress one.
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
name: Build site
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
python-version: "3.13"
- name: Install Cairo/Pango (social cards)
run: |
sudo apt-get update
sudo apt-get install -y libcairo2-dev libfreetype6-dev libffi-dev \
libjpeg-dev libpng-dev libz-dev pngquant
- name: Build with MkDocs
# The `docs` dependency group from pyproject.toml is the single source
# of truth; CI=true (set by Actions) enables the social cards plugin.
run: uv run --only-group docs mkdocs build --strict
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: site
deploy:
name: Deploy to GitHub Pages
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4