Skip to content

Commit f93eea3

Browse files
committed
feat(template): fold the libraries' improvements into docs.yml
The same bytes as the zensical-docs pack of bedrock-python/engineering-assets: workflow_dispatch, a concurrency group so two pushes do not race onto Pages, --no-dev --group docs on uv run, and uv sync --locked. New libraries start in step with the hub.
1 parent a1a1e7d commit f93eea3

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

‎template/.github/workflows/docs.yml‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,31 @@ name: Docs
33
on:
44
push:
55
branches: [master]
6+
workflow_dispatch:
67

78
permissions:
89
contents: read
910
pages: write
1011
id-token: write
1112

13+
# Two quick pushes must not race each other onto Pages.
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: false
17+
1218
jobs:
1319
build:
1420
runs-on: ubuntu-latest
1521
steps:
1622
- uses: actions/checkout@v7
1723
- uses: astral-sh/setup-uv@v7
18-
- run: uv sync --no-dev --group docs
24+
# --locked: fail when uv.lock is out of date with pyproject.toml.
25+
- run: uv sync --locked --no-dev --group docs
1926
- run: cp CHANGELOG.md docs/changelog.md
20-
- run: uv run zensical build --clean
21-
- run: uv run python scripts/emit_markdown.py
27+
# --no-dev on `uv run` too: without it the implicit sync reinstalls the
28+
# whole dev group just to build docs.
29+
- run: uv run --no-dev --group docs zensical build --clean
30+
- run: uv run --no-dev --group docs python scripts/emit_markdown.py
2231
- uses: actions/upload-pages-artifact@v5
2332
with:
2433
path: site

0 commit comments

Comments
 (0)