ci: deploy production docs on release, main preview on push - #2389
Conversation
✅ Deploy Preview for viteplus-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
✅ Staging deployment successful! Preview: https://viteplus-staging.void.app/ |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8db58d2405
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
8db58d2 to
74d0df5
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
6af0485 to
ad28f81
Compare
ad28f81 to
931449a
Compare
Production viteplus.dev deploys move from push-to-main to the release workflow, after the npm packages and the GitHub release are published. Pushes to main deploy to a dedicated main.viteplus.dev preview instead.
Production viteplus.dev (which also serves install.sh behind https://vite.plus) now deploys from release.yml after the npm packages and the GitHub release are published, at the release commit, skipped for prereleases. Pushes to main deploy to main.viteplus.dev instead, via the new deploy-docs-main.yml. workflow_dispatch on deploy-docs.yml remains for urgent production updates.
Replace the workflow_call design with a .github/actions/deploy-docs composite, following the repo convention for shared step sequences. deploy-docs.yml (manual production deploy), deploy-docs-main.yml, deploy-docs-preview.yml, and the release deploy-docs job are now thin callers; the preview passes per-PR cache keys via the new cache-ref / cache-sha inputs. RFC updated to match.
discord-notify now also needs deploy-docs. It gates on success-or-skipped because deploy-docs is skipped for prereleases: prerelease announcements still go out, while a failed docs deploy on a stable release holds the announcement back.
…loys A queued production deploy replaces a pending one in the shared deploy-docs group; the site converges to the newest queued deploy, and a replaced release deploy holds back discord-notify. Note this in the workflow comments and the RFC.
Preview deploys (main.viteplus.dev, PR staging) serve their own install scripts, but the docs hardcode the production https://vite.plus shortcuts. The deploy-docs composite now passes a site-origin input to the build as DOCS_SITE_ORIGIN. When set, a markdown-it rule rewrites the install URLs in markdown content, and the homepage install command and AI copy prompt read __DOCS_*__ define constants from the same origin (including the llms-full.txt link). The build:site task tracks the variable in env so each deploy target keeps its own Vite Task cache entry. Production builds are unchanged. Known gap: the llms dumps copy raw markdown and keep production URLs on previews.
931449a to
5e1e04e
Compare
Production viteplus.dev deploys on every push to main today. Docs for unreleased features go live at merge time, and install-script rewrites (for example #2346) would be served behind https://vite.plus before a release with matching binaries exists.
This PR adds
rfcs/deploy-docs-on-release.mdand implements it:.github/actions/deploy-docscomposite action holds the shared build and deploy steps (setup-vp, Vite Task cache,vp run build,vpx void deploy), withvoid-project/void-tokeninputs and optional cache-key inputs.deploy-docs.ymlloses its push trigger and becomes the manual (workflow_dispatch) production deploy, the escape hatch for urgent updates.release.ymlgains adeploy-docsjob that deploys production from the release commit after the Release job publishes npm and the GitHub release. Prereleases skip it.discord-notifynow waits for it (success, or the prerelease skip) before announcing.deploy-docs-main.yml(new) takes over the push trigger and deploys main to main.viteplus.dev (theviteplus-mainvoid.app project), a standing preview of the latest docs on main.deploy-docs-preview.ymlkeeps its trigger, staging target, and PR comment step, and now runs the same composite with per-PR cache keys.Setup needed before merge, outside this repo:
viteplus-mainproject on the void platform (sameVOID_TOKEN).main.viteplus.dev->viteplus-main.void.appand attach the custom domain to the project.Not included:
noindexfor the preview sites, which needs theme or platform support.