ci: deploy to production on GitHub release - #6
Conversation
Production deploys were triggered by every push to main through Vercel's Git integration. Disable that for main and deploy from a workflow that runs when a GitHub release is published, so shipping is an explicit act. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout. (1)
🔇 Additional comments (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds a release-triggered production deployment workflow using Bun and Vercel, with prerelease gating and serialized deployments. Adds Vercel configuration to disable Git deployments from ChangesProduction deployment
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant Bun
participant VercelCLI
participant Vercel
GitHubActions->>GitHubActions: Check out release tag
GitHubActions->>Bun: Install dependencies with frozen lockfile
GitHubActions->>VercelCLI: Pull production environment
VercelCLI->>Vercel: Build production output
VercelCLI->>Vercel: Deploy prebuilt output
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/production-deploy.yml:
- Around line 21-24: Remove VERCEL_TOKEN from the job-level env block and add it
only to the env sections of the Pull Vercel environment, Build, and Deploy
steps. Keep VERCEL_ORG_ID and VERCEL_PROJECT_ID at their existing scope.
- Around line 33-36: Update the “Set up Bun” step using oven-sh/setup-bun to set
its no-cache option to true, ensuring this privileged production deploy does not
use Bun executable caching.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 4124bad0-5485-446e-a2df-b1dd0e8d2d73
📒 Files selected for processing (2)
.github/workflows/production-deploy.ymlvercel.json
📜 Review details
🧰 Additional context used
🪛 zizmor (1.26.1)
.github/workflows/production-deploy.yml
[error] 34-34: runtime artifacts potentially vulnerable to a cache poisoning attack (cache-poisoning): enables caching by default
(cache-poisoning)
🔇 Additional comments (4)
.github/workflows/production-deploy.yml (3)
1-19: LGTM!
26-31: LGTM!
38-48: LGTM!vercel.json (1)
1-8: LGTM!
Scope VERCEL_TOKEN to the three Vercel CLI steps so checkout, setup, and dependency install never see it, and skip Bun executable caching in this privileged job. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
What
Production deploys stop happening on every merge to
mainand now run when a GitHub release is published.vercel.json: disables Vercel's Git-triggered deploys formain. PR previews are unaffected — only production auto-deploy is turned off..github/workflows/production-deploy.yml: onrelease: published, checks out the release tag and deploys via the Vercel CLI (pull→build --prod→deploy --prebuilt --prod). Pre-releases are skipped.Required before merge
Add these repository secrets, otherwise the workflow fails and nothing deploys:
VERCEL_TOKEN— Vercel → Account Settings → TokensVERCEL_ORG_IDandVERCEL_PROJECT_ID— from.vercel/project.jsonafter runningvercel linkNotes
🤖 Generated with Claude Code