Skip to content

chore(docs): deploy docs on release publish#2323

Open
dancormier wants to merge 4 commits into
mainfrom
STACKS-862/docs-release-trigger
Open

chore(docs): deploy docs on release publish#2323
dancormier wants to merge 4 commits into
mainfrom
STACKS-862/docs-release-trigger

Conversation

@dancormier

@dancormier dancormier commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

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/version-file commits
  • 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 packages/stacks-docs/netlify.toml and netlify-ignore.sh for Netlify build gating.
  • 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

  • COMMIT_REF=HEAD bash packages/stacks-docs/netlify-ignore.sh verifies a normal non-release production deploy is skipped.
  • CONTEXT=deploy-preview COMMIT_REF=HEAD bash packages/stacks-docs/netlify-ignore.sh verifies PR deploy previews are allowed.
  • CONTEXT=branch-deploy COMMIT_REF=HEAD bash packages/stacks-docs/netlify-ignore.sh verifies configured branch deploys, like v2, are allowed.
  • INCOMING_HOOK_BODY='{"forceDocsDeploy":true,"source":"workflow_dispatch"}' COMMIT_REF=HEAD bash packages/stacks-docs/netlify-ignore.sh verifies the manual deploy payload bypasses the guard.
  • bash -n packages/stacks-docs/netlify-ignore.sh verifies the shell script syntax.

npm run check -w packages/stacks-docs completed with existing warnings and no errors.

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

Related Issue

STACKS-862

@netlify

netlify Bot commented Jul 8, 2026

Copy link
Copy Markdown

Deploy Preview for stacks ready!

Name Link
🔨 Latest commit ee6ce82
🔍 Latest deploy log https://app.netlify.com/projects/stacks/deploys/6a4ea8fdc8eba40008102795
😎 Deploy Preview https://deploy-preview-2323--stacks.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@changeset-bot

changeset-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ee6ce82

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

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment thread .github/workflows/deploy-docs.yml Fixed
@dancormier dancormier marked this pull request as ready for review July 8, 2026 20:00
@dancormier dancormier requested a review from a team as a code owner July 8, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants