Skip to content

Add Cloudflare Pages docs preview with /preview-docs slash command - #3028

Merged
maxisbey merged 3 commits into
mainfrom
localden/docs-preview-cloudflare
Jun 30, 2026
Merged

Add Cloudflare Pages docs preview with /preview-docs slash command#3028
maxisbey merged 3 commits into
mainfrom
localden/docs-preview-cloudflare

Add Cloudflare Pages docs preview workflow with /preview-docs slash c…

dd9eb9d
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jun 30, 2026 in 15m 50s

Code review found 2 important issues

Found 5 candidates, confirmed 2. See review comments for details.

Details

Severity Count
🔴 Important 2
🟡 Nit 0
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important .github/workflows/docs-preview.yml:113-121 Untrusted PR code can poison the shared Actions cache (enable-cache: true under pull_request_target)
🔴 Important .github/workflows/docs-preview.yml:30-32 Any PR comment cancels an in-progress docs preview build

Annotations

Check failure on line 121 in .github/workflows/docs-preview.yml

See this annotation in the file changed.

@claude claude / Claude Code Review

Untrusted PR code can poison the shared Actions cache (enable-cache: true under pull_request_target)

The `build` job runs untrusted PR code (uv sync + mkdocs/mkdocstrings importing the PR's `src/mcp`) under `pull_request_target` with `setup-uv` `enable-cache: true`, so any cache it saves lands in the base-branch (main) Actions cache scope where trusted workflows (shared.yml, conformance.yml, deploy-docs.yml) can restore it — a cache-poisoning vector the artifact-handoff isolation doesn't cover. Set `enable-cache: false` in this job (as publish-pypi.yml already does) or use a `cache-suffix` name

Check failure on line 32 in .github/workflows/docs-preview.yml

See this annotation in the file changed.

@claude claude / Claude Code Review

Any PR comment cancels an in-progress docs preview build

Because this workflow triggers on every `issue_comment: created` and the workflow-level concurrency group resolves to `docs-preview-pr-<N>` for both `pull_request_target` and `issue_comment` events with `cancel-in-progress: true`, any ordinary comment posted on PR N while a preview build/deploy is in flight cancels that run — the new run then skips every job (the `authorize` job filters out non-`/preview-docs` comments), so the preview is silently lost and the sticky comment is never updated. Co