Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions template/.github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,31 @@ name: Docs
on:
push:
branches: [master]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

# Two quick pushes must not race each other onto Pages.
concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v7
- run: uv sync --no-dev --group docs
# --locked: fail when uv.lock is out of date with pyproject.toml.
- run: uv sync --locked --no-dev --group docs
- run: cp CHANGELOG.md docs/changelog.md
- run: uv run zensical build --clean
- run: uv run python scripts/emit_markdown.py
# --no-dev on `uv run` too: without it the implicit sync reinstalls the
# whole dev group just to build docs.
- run: uv run --no-dev --group docs zensical build --clean
- run: uv run --no-dev --group docs python scripts/emit_markdown.py
- uses: actions/upload-pages-artifact@v5
with:
path: site
Expand Down
Loading