Title: ci: pick the docs-preview toolchain from the PR checkout by maxisbey · Pull Request #3081 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: ci: pick the docs-preview toolchain from the PR checkout by maxisbey · Pull Request #3081 · modelcontextprotocol/python-sdk
X Title: ci: pick the docs-preview toolchain from the PR checkout by maxisbey · Pull Request #3081 · modelcontextprotocol/python-sdk
Description: Unblocks docs previews for #3073 (and any future toolchain change) by resolving the pull_request_target chicken-and-egg: this workflow file always runs from the base branch, so a hardcoded build recipe can only preview heads that share the base's toolchain — #3073's preview check is currently guaranteed-red until after it merges. Motivation and Context The build job checks out the PR head but runs base-branch workflow steps. Instead of hardcoding the MkDocs commands, detect the recipe from the checkout: heads that ship scripts/docs/build.sh (a complete recipe, dependency sync included — arrives with #3073) build with it; all other heads — including v1.x heads previewed via /preview-docs — keep today's MkDocs path unchanged. Same pattern as build_site() in scripts/build-docs.sh on #3073; the two copies cross-reference each other. On main today this is a no-op: scripts/docs/build.sh doesn't exist, so every preview takes the fallback arm, which is byte-equivalent to the current step. Also sets if-no-files-found: error on the artifact upload, so a build arm that violates the site/ output contract fails loudly in build instead of as a confusing artifact-download error in deploy. Security posture is unchanged: the build job already executes head-controlled Python (mkdocstrings imports src/mcp, !!python/name: config directives), is admin-gated by authorize, and never shares a runner with the Cloudflare token. The header comment now spells out the head-supplied-script vector explicitly. How Has This Been Tested? The fallback arm is the existing command relocated (verified by inspection; it's what every preview on main runs today). The build.sh arm is exercised by #3073's preview run once this merges — that run is the end-to-end verification, and #3073's own CI builds the same script from its branch. Breaking Changes None. Types of changes Bug fix (non-breaking change which fixes an issue) New feature (non-breaking change which adds functionality) Breaking change (fix or feature that would cause existing functionality to change) Documentation update Checklist I have read the MCP Documentation My code follows the repository's style guidelines New and existing tests pass locally Additional context Merge order: this first, then #3073 — its preview goes green on the next push to that branch afterwards. AI Disclaimer
Open Graph Description: Unblocks docs previews for #3073 (and any future toolchain change) by resolving the pull_request_target chicken-and-egg: this workflow file always runs from the base branch, so a hardcoded build re...
X Description: Unblocks docs previews for #3073 (and any future toolchain change) by resolving the pull_request_target chicken-and-egg: this workflow file always runs from the base branch, so a hardcoded build re...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/3081
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:d3e87fe8-573b-74b9-c0eb-af054632a520 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A000:3C01BE:1CE75C:27A11A:6A583F89 |
| html-safe-nonce | 1d607628581eecfe0e2afc5abd70b5d88c1e0bf24025d87d83f8a3bf4435d397 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDAwOjNDMDFCRToxQ0U3NUM6MjdBMTFBOjZBNTgzRjg5IiwidmlzaXRvcl9pZCI6Ijg5NDU1MTIzOTc4OTQzMzYzOTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 75c95328bea0ea9ab662a6f1846f9abc25cf458cad2ea5f9e06430aac90bc069 |
| hovercard-subject-tag | pull_request:4022035395 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/modelcontextprotocol/python-sdk/pull/3081/files |
| twitter:image | https://avatars.githubusercontent.com/u/224885523?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/224885523?s=400&v=4 |
| og:image:alt | Unblocks docs previews for #3073 (and any future toolchain change) by resolving the pull_request_target chicken-and-egg: this workflow file always runs from the base branch, so a hardcoded build re... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f2a0c7865178af3d91dd9f13b0cdfc3c73a2529c873d2780bb4c01271a57ec6 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862584018 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862584018 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/python-sdk |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8aae7b8d6caacacf5c66eaeb2702d8dc88d85b4a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width