Skip to content

Commit 411a6d3

Browse files
authored
Rebuild the docs around tested examples; shrink README.v2.md to a pitch (#2978)
1 parent 4caa41f commit 411a6d3

198 files changed

Lines changed: 9510 additions & 2639 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy-docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
- v1.x
88
paths:
99
- docs/**
10+
# docs pages include their code blocks from these files via `--8<--`, so a
11+
# change here changes the rendered site even when no .md file moves.
12+
- docs_src/**
1013
- mkdocs.yml
1114
- src/mcp/**
1215
- scripts/build-docs.sh

.github/workflows/shared.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,26 @@ jobs:
110110

111111
- name: Check README snippets are up to date
112112
run: uv run --frozen scripts/update_readme_snippets.py --check --readme README.v2.md
113+
114+
# `mkdocs.yml` sets `strict: true` and `pymdownx.snippets: check_paths: true`,
115+
# but until this job existed the docs were only ever built post-merge by
116+
# `deploy-docs.yml`, so a broken link, a missing nav target, or a deleted
117+
# `docs_src/` include went green on the PR and broke the next deploy of main.
118+
# This is the check path; `deploy-docs.yml` stays the deploy path.
119+
docs:
120+
runs-on: ubuntu-latest
121+
steps:
122+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
123+
with:
124+
persist-credentials: false
125+
126+
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
127+
with:
128+
enable-cache: true
129+
version: 0.9.5
130+
131+
- name: Install dependencies
132+
run: uv sync --frozen --all-extras --python 3.10
133+
134+
- name: Build the docs in strict mode
135+
run: uv run --frozen --no-sync mkdocs build --strict

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,5 @@ repos:
6565
name: Check README snippets are up to date
6666
entry: uv run --frozen python scripts/update_readme_snippets.py --check
6767
language: system
68-
files: ^(README\.v2\.md|examples/.*\.py|scripts/update_readme_snippets\.py)$
68+
files: ^(README\.v2\.md|docs_src/.*\.py|examples/.*\.py|scripts/update_readme_snippets\.py)$
6969
pass_filenames: false

0 commit comments

Comments
 (0)