Skip to content

Comments

feat: Only deploy docs to production on release tags#1917

Open
ntotten wants to merge 1 commit intomainfrom
docs/release-only-production-deploy
Open

feat: Only deploy docs to production on release tags#1917
ntotten wants to merge 1 commit intomainfrom
docs/release-only-production-deploy

Conversation

@ntotten
Copy link
Member

@ntotten ntotten commented Jan 30, 2026

Summary

  • Add Vercel Ignored Build Step script to control production deployments
  • Preview deployments proceed normally
  • Production deployments only proceed when the commit has a release tag (e.g., v1.0.0)
  • Ensures the docs site version matches the published release

Setup Required

After merging, configure in Vercel dashboard:

  1. Go to project → SettingsGit
  2. Find Ignored Build Step
  3. Enter: bash scripts/check-release-tag.sh
  4. Save

Test plan

  • Verify preview deployments still work on PRs
  • Verify production builds are skipped on non-tagged main commits
  • Verify production builds proceed when a release tag is present

🤖 Generated with Claude Code

Add Vercel Ignored Build Step script that allows preview deployments
to proceed normally but only allows production deployments when the
commit has a release tag (e.g., v1.0.0). This ensures the docs site
matches the published release version.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 30, 2026 14:43
@vercel
Copy link

vercel bot commented Jan 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
zudoku-cosmo-cargo Ready Ready Preview Jan 30, 2026 2:45pm
zudoku-dev Ready Ready Preview Jan 30, 2026 2:45pm

Request Review

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a Vercel Ignored Build Step script to control when documentation is deployed to production. The script ensures that production deployments only occur when a commit has been tagged with a release version (e.g., v1.0.0), while allowing preview deployments to proceed normally for all PRs.

Changes:

  • Added bash script docs/scripts/check-release-tag.sh that checks for release tags before allowing production builds
  • Script uses Vercel environment variables to distinguish between preview and production deployments
  • Tag validation uses regex pattern matching to identify semantic version tags

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


# Check if any tag matches a version pattern
for TAG in $TAGS; do
if echo "$TAG" | grep -qE '^v?[0-9]+\.[0-9]+\.[0-9]+'; then
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

The regex pattern will match prerelease version tags like "v1.0.0-beta" or "v0.0.0-z123abc" because it doesn't anchor at the end of the string. Based on the PR description stating "Production deployments only proceed when the commit has a release tag (e.g., v1.0.0)", it appears the intention is to match only stable release versions, not prereleases. Consider anchoring the pattern at the end with '$' or adding explicit exclusion of prerelease suffixes: '^v?[0-9]+.[0-9]+.[0-9]+$'

Suggested change
if echo "$TAG" | grep -qE '^v?[0-9]+\.[0-9]+\.[0-9]+'; then
if echo "$TAG" | grep -qE '^v?[0-9]+\.[0-9]+\.[0-9]+$'; then

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

Preview build of published Zudoku package for commit fa907b8.

See the deployment at: https://56855286.cosmocargo-public-package.pages.dev

Note

This is a preview of the Cosmo Cargo example using the Zudoku package published to a local registry to ensure it'll be working when published to the public NPM registry.

Last updated: 2026-01-30T14:47:32.140Z

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.

1 participant