Skip to content

ci: deploy the site to production from the release job, not on every push to main - #62

Merged
hyamero merged 2 commits into
stagingfrom
ci/deploy-site-from-release
Oct 24, 2026
Merged

hyamero merged 2 commits into
stagingfrom
ci/deploy-site-from-release

Conversation

@hyamero

@hyamero hyamero commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

What and why

Every stable release puts two commits on main a few minutes apart: the staging merge (old version) and the bot's chore(release): x.y.z commit. Vercel deployed both to production, and whichever finished last went live. On 2026-10-21 the 0.5.0 merge commit landed after the 0.6.0 release commit, so the site showed 0.5.0 while npm latest was 0.6.0.

  • site/vercel.json: git.deploymentEnabled.main = false, so Vercel no longer deploys main on push. PRs and staging still get previews.
  • ci.yml: a new deploy-site job runs after release on main and calls a Vercel Deploy Hook, which builds main's tip. An older commit can no longer replace a newer one.
  • release now also needs the site job, so a red site build blocks the release and the deploy.
  • The build-skip check now includes ../skill, since the site renders skill/examples/. That pushed ignoreCommand past vercel.json's 256-character limit, so the check moved to site/scripts/ignore-build.sh (same logic).
  • CONTRIBUTING's Releases section describes the new path.

Before merging into main: create a Vercel Deploy Hook for branch main (Project → Settings → Git → Deploy Hooks) and save its URL as the repository secret VERCEL_DEPLOY_HOOK_MAIN. Without the secret, deploy-site fails on purpose rather than silently skipping production.

How it was checked

  • actionlint passes on the workflow, and the YAML and JSON both parse.
  • ignoreCommand dry runs: with the previous SHA 3 commits back it exits 1 (build); with the previous SHA at HEAD it exits 0 (skip).
  • Site tests pass (114/114).
  • After the next push to main: deploy site should be green, Vercel should show one production deployment from the hook for main's tip, and the footer should match npm view @omsimos/stackmap dist-tags.latest.

@vercel

vercel Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
stackmap-site Ready Ready Preview Oct 24, 2026 4:03am UTC

@vercel

vercel Bot commented Oct 23, 2026

Copy link
Copy Markdown

Deployment failed for project stackmap-site with the following error:

The `vercel.json` schema validation failed with the following message: `ignoreCommand` should NOT be longer than 256 characters

Learn More: https://vercel.com/docs/concepts/projects/project-configuration

@hyamero
hyamero merged commit 83636c0 into staging Oct 24, 2026
8 checks passed
@hyamero
hyamero deleted the ci/deploy-site-from-release branch October 24, 2026 04:07
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.6.1-rc.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.6.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

This branch was successfully deployed

1 active deployment
Preview — 44103c64 Deployed Oct 24, 2026 by vercel[bot]
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.

1 participant