Skip to content

ci: add docs PR checks and trusted preview deploys#875

Merged
BigLep merged 3 commits into
masterfrom
rvagg/ci-docs
Jul 10, 2026
Merged

ci: add docs PR checks and trusted preview deploys#875
BigLep merged 3 commits into
masterfrom
rvagg/ci-docs

Conversation

@rvagg

@rvagg rvagg commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Trying to do two things here:

  1. Run in-repo docs validation on every PR, including fork PRs.
  • docs-check always runs the markdown lint for docs-relevant changes.
  • It also builds the docs when full CI is not already going to do that.
  • This gives us GitHub-visible lint/build failures, which the existing Cloudflare preview integration does not provide.
  1. Allow manual preview publishing for a reviewed/trusted PR.
  • Same-repo branches already get Cloudflare Workers preview URLs from the existing Cloudflare Git integration.
  • Fork PRs do not get those previews, and we should not expose Cloudflare secrets to automatic fork PR workflows.
  • The manual documentation workflow now accepts a PR number and reviewed commit SHA, checks that the PR head still matches that SHA, restores the trusted Wrangler config from master, then uploads a non-production preview version.

@rvagg rvagg requested a review from BigLep July 9, 2026 04:32
@rvagg rvagg requested a review from hugomrdias as a code owner July 9, 2026 04:32
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FOC Jul 9, 2026
@rvagg rvagg requested a review from Copilot July 9, 2026 04:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_number input support to the docs publish workflow to optionally deploy a trusted PR preview (otherwise deploy production from master).
  • Introduce a docs-check PR 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.

Comment thread .github/workflows/docs.yml

@BigLep BigLep left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .github/workflows/docs.yml
Comment thread .github/workflows/docs.yml
Comment thread .github/workflows/docs-check.yml
Comment thread .github/workflows/docs-check.yml Outdated
@github-project-automation github-project-automation Bot moved this from 📌 Triage to ✔️ Approved by reviewer in FOC Jul 10, 2026
@rvagg

rvagg commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator Author

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.

@BigLep BigLep merged commit 9ab0c9c into master Jul 10, 2026
6 checks passed
@BigLep BigLep deleted the rvagg/ci-docs branch July 10, 2026 14:42
@github-project-automation github-project-automation Bot moved this from ✔️ Approved by reviewer to 🎉 Done in FOC Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

3 participants