You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deploy production docs from the release flow instead of ordinary main pushes. When Changesets publishes packages from main, the release workflow calls the Netlify build hook in NETLIFY_DOCS_BUILD_HOOK_URL.
This also adds a separate manual Deploy docs workflow for the rare case where we intentionally want to deploy the latest packages/stacks-docs content from main without publishing a package release.
Why
Netlify continuous deployment is still active so PR previews and the v2 branch deploy keep working. Because main is also the production branch, normal main pushes could otherwise deploy production docs even when no package was released.
This PR keeps Netlify active, but adds a Netlify ignore guard so production builds only proceed for:
release-triggered build hooks
explicit manual docs deploys
deploy previews and branch deploys
Changes
Adds a release-only Netlify build hook call in .github/workflows/main.yml.
Adds .github/workflows/deploy-docs.yml for manual latest-main docs deploys.
Adds bounded retries to both build-hook calls.
Adds packages/stacks-docs/netlify.toml and netlify-ignore.sh for Netlify build gating.
Adds automated coverage for production, deploy-preview, and branch-deploy contexts.
Updates README.md with the release/manual docs deploy behavior.
Required Configuration
Add NETLIFY_DOCS_BUILD_HOOK_URL as a GitHub Actions secret containing the Netlify build hook URL for the docs site. See Netlify
Testing
npm run test -w packages/stacks-docs passes the existing docs tests and the Netlify ignore tests.
npm run check -w packages/stacks-docs completes with existing warnings and no errors.
npm run lint -w packages/stacks-docs completes with existing warnings and no errors.
bash -n packages/stacks-docs/netlify-ignore.sh verifies the shell script syntax.
The Netlify deploy preview confirms the deploy-preview context remains enabled.
Netlify documents that build hooks bypass the ignore result, so release and manual hook builds proceed while automatic production builds are skipped.
Testing Limits
The full release path cannot be tested before merge without performing a real release from main; steps.changesets.outputs.published == 'true' only happens when Changesets publishes packages after version bumps land on main.
The first complete production validation of the release path will happen on the next actual package release. The manual workflow also cannot be run from main until this workflow file exists on main.
Netlify/Terraform Follow-Up
This change uses a Netlify build hook named GitHub release deploy. It may need to be moved into Terraform as part of STACKS-860. @ttaylor-stack
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
The full release path cannot be tested before merge without performing a real release from main; steps.changesets.outputs.published == 'true' only happens when Changesets publishes packages after version bumps land on main.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Deploy production docs from the release flow instead of ordinary
mainpushes. When Changesets publishes packages frommain, the release workflow calls the Netlify build hook inNETLIFY_DOCS_BUILD_HOOK_URL.This also adds a separate manual
Deploy docsworkflow for the rare case where we intentionally want to deploy the latestpackages/stacks-docscontent frommainwithout publishing a package release.Why
Netlify continuous deployment is still active so PR previews and the
v2branch deploy keep working. Becausemainis also the production branch, normalmainpushes could otherwise deploy production docs even when no package was released.This PR keeps Netlify active, but adds a Netlify ignore guard so production builds only proceed for:
Changes
.github/workflows/main.yml..github/workflows/deploy-docs.ymlfor manual latest-maindocs deploys.packages/stacks-docs/netlify.tomlandnetlify-ignore.shfor Netlify build gating.README.mdwith the release/manual docs deploy behavior.Required Configuration
NETLIFY_DOCS_BUILD_HOOK_URLas a GitHub Actions secret containing the Netlify build hook URL for the docs site. See NetlifyTesting
npm run test -w packages/stacks-docspasses the existing docs tests and the Netlify ignore tests.npm run check -w packages/stacks-docscompletes with existing warnings and no errors.npm run lint -w packages/stacks-docscompletes with existing warnings and no errors.bash -n packages/stacks-docs/netlify-ignore.shverifies the shell script syntax.deploy-previewcontext remains enabled.Netlify documents that build hooks bypass the ignore result, so release and manual hook builds proceed while automatic production builds are skipped.
Testing Limits
The full release path cannot be tested before merge without performing a real release from
main;steps.changesets.outputs.published == 'true'only happens when Changesets publishes packages after version bumps land onmain.The first complete production validation of the release path will happen on the next actual package release. The manual workflow also cannot be run from
mainuntil this workflow file exists onmain.Netlify/Terraform Follow-Up
This change uses a Netlify build hook named
GitHub release deploy. It may need to be moved into Terraform as part of STACKS-860. @ttaylor-stackRelated Issue
STACKS-862