ci(docs-mcp): content pipeline to upload per-page docs Markdown to R2#12118
Open
aurindam wants to merge 6 commits into
Open
ci(docs-mcp): content pipeline to upload per-page docs Markdown to R2#12118aurindam wants to merge 6 commits into
aurindam wants to merge 6 commits into
Conversation
…n to R2 Feeds the Slint documentation MCP server (docs-mcp.slint.dev, a hosted Cloudflare Worker in the private slint-ui/docs-mcp repo). After the docs build, collect each Starlight site's per-page .md (from docs/common's markdown-endpoint) and rclone-sync it to the R2 bucket that Cloudflare AI Search indexes, as <version>/<segment>/<slug>.md. - scripts/docs-mcp/collect-and-upload.mjs — collect per-page .md (flat + base-nested dist layouts), stage, rclone sync (idempotent; prunes removed pages; scoped to the <version>/ prefix). - .github/workflows/docs-mcp-upload.yaml — reusable workflow; installs rclone and runs the collector. Guarded by a placeholder bucket name so it no-ops until an owner wires it after build_docs.yaml with the R2 secrets. - scripts/docs-mcp/README.md — pipeline docs. Inert until wired: does not change the existing docs build. Depends on the per-page .md endpoints already on master (safety added in #12105). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Call docs-mcp-upload.yaml after the `docs` job in nightly_snapshot.yaml, gated on the same `private != 'true'` condition as publish_artifacts, so the docs MCP server's R2 bucket (slint-docs-mcp) is refreshed whenever the snapshot/release docs are published. `release` is passed through, so the corpus uploads under `master` (snapshot) or the version number (release). `secrets: inherit` provides CLOUDFLARE_ACCOUNT_ID / R2_ACCESS_KEY_ID / R2_SECRET_ACCESS_KEY. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
master does not yet have "llms" in the cspell project dictionary (that lives on the docs-llms-txt branch), so avoid the word here rather than couple this PR to a dictionary change. Same meaning: only per-page .md is uploaded; aggregate .txt is skipped. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The reusable workflow no longer needs the REPLACE_ME_r2_bucket placeholder default or the `if: r2-bucket != 'REPLACE_ME_...'` no-op guard: the caller (nightly_snapshot.yaml) now passes the real bucket (slint-docs-mcp) and gates the job on `private != 'true'`. Make `r2-bucket` a required input and remove the guard so the configuration is explicit rather than placeholder-driven. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The real caller now lives in this same PR (upload-docs-mcp in nightly_snapshot.yaml), so the header's example was a second, hand-maintained copy that had already drifted (needs: build-docs vs docs; explicit secrets vs inherit). Keep only the actual constraint (must run after build_docs in the same run for the docs-* artifacts) and point at the real caller. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Drop the self-referential parenthetical; the value lives at the call site (nightly_snapshot.yaml passes slint-docs-mcp) and the input is required. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds the CI pipeline that feeds the Slint documentation MCP server — a hosted Cloudflare Worker (
docs-mcp.slint.dev) that lets AI coding agents search/read the Slint docs over MCP. The Worker itself lives in a separate private repo (slint-ui/docs-mcp); this PR is only the monorepo half: the step that gets docs content into the R2 bucket that Cloudflare AI Search indexes.After the docs build, it collects each Starlight site's per-page Markdown (the
.mdendpoints fromdocs/common/src/utils/markdown-endpoint.ts) andrclone syncs it to R2 as<version>/<segment>/<slug>.md.🤖 Generated with Claude Code