Skip to content

ci(docs-mcp): content pipeline to upload per-page docs Markdown to R2#12118

Open
aurindam wants to merge 6 commits into
masterfrom
docs-mcp-pipeline
Open

ci(docs-mcp): content pipeline to upload per-page docs Markdown to R2#12118
aurindam wants to merge 6 commits into
masterfrom
docs-mcp-pipeline

Conversation

@aurindam

@aurindam aurindam commented Jun 15, 2026

Copy link
Copy Markdown
Member

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 .md endpoints from docs/common/src/utils/markdown-endpoint.ts) and rclone syncs it to R2 as <version>/<segment>/<slug>.md.

🤖 Generated with Claude Code

aurindam and others added 3 commits June 15, 2026 20:25
…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>
@aurindam aurindam requested a review from tronical June 15, 2026 18:57
aurindam and others added 3 commits June 15, 2026 21:02
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant