Skip to content

ci(docs): trigger preview workflow on docs PRs to main#2992

Merged
caio-pizzol merged 1 commit into
mainfrom
caio/docs-preview-on-main-prs
Apr 29, 2026
Merged

ci(docs): trigger preview workflow on docs PRs to main#2992
caio-pizzol merged 1 commit into
mainfrom
caio/docs-preview-on-main-prs

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

Doc authors who PR against `main` currently get no hosted preview. Mintlify's automatic previews only fire on PRs targeting the deployment branch (`docs-stable` since #2989), and the preview workflow added in #2989 only fires on PRs targeting `stable`. They'd only see a preview when their change reached the promote-stable PR, which can be days later.

This adds `main` as a trigger branch and gates the workflow with a path filter so it only fires when something docs-relevant changed. The 5 req/min Mintlify API quota stays comfortably out of reach.

The path filter also now applies to `stable` PRs. Promote-stable PRs always touch docs so they still get previews; code-only stable hotfixes don't need one.

Caught while testing the new flow on #2991.

Doc authors who PR against main currently get no hosted preview because Mintlify's automatic previews only fire on PRs targeting the deployment branch (docs-stable) and our preview workflow only fired on PRs targeting stable. They'd only see a preview when their work reached the promote-stable PR, days later.

Add main as a trigger branch so doc-touching PRs to main get an instant preview URL. Path filter on apps/docs, document-api contract, and the generator script keeps the 5 req/min Mintlify API quota from being spent on unrelated code PRs. The path filter also applies to stable PRs but that's fine: promote-stable PRs always include docs, and code-only stable hotfixes don't need a docs preview.
@caio-pizzol caio-pizzol merged commit 56be3e3 into main Apr 29, 2026
7 checks passed
@caio-pizzol caio-pizzol deleted the caio/docs-preview-on-main-prs branch April 29, 2026 10:51
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

βœ… All modified and coverable lines are covered by tests.

πŸ“’ Thoughts on this report? Let us know!

caio-pizzol added a commit that referenced this pull request Apr 29, 2026
Rename `preview-stable-docs.yml` to `docs-preview-pr.yml` (the file covered both main and stable PRs since #2992, so the old name was misleading) and `refresh-main-docs-preview.yml` to `docs-preview-main.yml`. Both now share the `docs-preview-` prefix so they sort together in the Actions UI, with display names "πŸ“– Docs preview (PR)" and "πŸ“– Docs preview (main)". Production promotion stays as a step inside release-stable.yml since it's gated on the orchestrator's `promote_sha` output and benefits from sharing a job with the release steps.
caio-pizzol added a commit that referenced this pull request Apr 29, 2026
Doc authors who PR against main currently get no hosted preview because Mintlify's automatic previews only fire on PRs targeting the deployment branch (docs-stable) and our preview workflow only fired on PRs targeting stable. They'd only see a preview when their work reached the promote-stable PR, days later.

Add main as a trigger branch so doc-touching PRs to main get an instant preview URL. Path filter on apps/docs, document-api contract, and the generator script keeps the 5 req/min Mintlify API quota from being spent on unrelated code PRs. The path filter also applies to stable PRs but that's fine: promote-stable PRs always include docs, and code-only stable hotfixes don't need a docs preview.
caio-pizzol added a commit that referenced this pull request Apr 29, 2026
Rename `preview-stable-docs.yml` to `docs-preview-pr.yml` (the file covered both main and stable PRs since #2992, so the old name was misleading) and `refresh-main-docs-preview.yml` to `docs-preview-main.yml`. Both now share the `docs-preview-` prefix so they sort together in the Actions UI, with display names "πŸ“– Docs preview (PR)" and "πŸ“– Docs preview (main)". Production promotion stays as a step inside release-stable.yml since it's gated on the orchestrator's `promote_sha` output and benefits from sharing a job with the release steps.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants