ci: add docs PR checks and trusted preview deploys#875
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a docs-focused CI check for documentation-only pull requests and extends the existing docs publishing workflow to support “trusted” preview deployments by PR number. This fits the repo’s existing Cloudflare/Wrangler-based deploy workflows (similar to demo.yml) while ensuring docs builds happen for docs changes even when full CI wouldn’t otherwise run.
Changes:
- Add
pr_numberinput support to the docs publish workflow to optionally deploy a trusted PR preview (otherwise deploy production frommaster). - Introduce a
docs-checkPR workflow that builds docs when docs-related files change and the full CI workflow is not expected to run.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/docs.yml | Adds optional trusted PR checkout + preview deploy path alongside existing production deploy path. |
| .github/workflows/docs-check.yml | Adds a PR check to build docs for docs-only changes, skipping when full CI already covers docs builds. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
BigLep
left a comment
There was a problem hiding this comment.
Thanks for this. Could you expand the PR description (or a comment in the workflows) on the motivation? In particular the relationship to the existing Cloudflare Workers Builds Git integration: IIUC today that is what builds docs PRs and posts preview URLs (e.g. what I got with #874), but it is configured outside the repo and does not cover fork PRs. Is the intent that we stop relying on that integration, and if so should it be disabled once this lands so we do not run two parallel build pipelines? Having that rationale written down will help the next person understand why both docs-check.yml and the Workers Builds checks exist.
|
Updated the original post with more details. What I really want is actual checking / linting of docs on docs PRs, it's extremely annoying when a doc change lands that breaks lint and we end up having to fix it in an unrelated code PR. Plus (the thing that actually triggered this), the ability to see the docs for fork PRs like for #873 - in that case I have no trust issues with the author, I just want to be able to click something to see the preview. |
Trying to do two things here:
docs-checkalways runs the markdown lint for docs-relevant changes.documentationworkflow now accepts a PR number and reviewed commit SHA, checks that the PR head still matches that SHA, restores the trusted Wrangler config frommaster, then uploads a non-production preview version.