Quick guide to configure Vercel deployment in CircleCI.
-
Go to CircleCI Environment Variables:
https://app.circleci.com/settings/project/github/evgenygurin/claude-code-ui-nextjs/environment-variables -
Click "Add Environment Variable" and add each of these:
Name Value VERCEL_TOKEN0kWh3gtlep9I2x8fgr2Dhg6SVERCEL_ORG_IDteam_vQW0xhMJhexCPBThcGxpeSpwVERCEL_PROJECT_IDprj_HxQFyOmeZTF9MueNaC1ufJxkfcjj -
Click "Add Environment Variable" for each one
# Install CircleCI CLI
brew install circleci
# Add environment variables
circleci env add VERCEL_TOKEN 0kWh3gtlep9I2x8fgr2Dhg6S
circleci env add VERCEL_ORG_ID team_vQW0xhMJhexCPBThcGxpeSpw
circleci env add VERCEL_PROJECT_ID prj_HxQFyOmeZTF9MueNaC1ufJxkfcjj-
Trigger a new build (push a commit or rerun a workflow)
-
Check the "Validate Vercel Environment Variables" step in the deploy_preview job
-
Expected Output:
✅ All Vercel environment variables are properly configured Token length: 32 chars Org ID: team_vQW0x... Project ID: prj_HxQFy...
-
Create a new branch and push:
git checkout -b test/vercel-deployment git commit --allow-empty -m "test: verify Vercel deployment" git push origin test/vercel-deployment -
Check CircleCI pipeline - deploy_preview job should succeed
-
Find deployment URL in the job output:
Preview Deployment: https://claude-code-ui-nextjs-xxx.vercel.app -
Visit the URL to verify the deployment
If deployment fails in the future with authentication errors:
- Go to https://vercel.com/account/tokens
- Generate a new token
- Update
VERCEL_TOKENin CircleCI
The token needs these permissions:
- ✅ Read and write access to deployments
- ✅ Read access to team settings (for VERCEL_ORG_ID)
- ✅ Read access to project settings (for VERCEL_PROJECT_ID)
# On a feature branch
git checkout -b feature/test-feature
# Make changes
git add .
git commit -m "feat: test feature"
git push origin feature/test-feature
# CircleCI will deploy to preview URL
# Check logs for: "Preview Deployment: https://..."# Merge to main
git checkout main
git merge feature/test-feature
git push origin main
# CircleCI will deploy to production
# Check logs for: "Production Deployment: https://..."Cause: Environment variable not configured Solution: Follow Step 1 above
Cause: Token has expired Solution: Generate new token at https://vercel.com/account/tokens
Cause: VERCEL_PROJECT_ID is incorrect
Solution: Check .vercel/project.json for correct ID
Cause: VERCEL_ORG_ID is incorrect
Solution: Check .vercel/project.json for correct ID
View all deployments: https://app.circleci.com/pipelines/github/evgenygurin/claude-code-ui-nextjs
View all deployments: https://vercel.com/dashboard
Deployments are automatically tracked in Sentry (if configured):
- Release tracking
- Source maps upload
- Performance monitoring
✅ All 3 environment variables added to CircleCI ✅ deploy_preview job passes for feature branches ✅ deploy_production job passes for main branch ✅ Preview URLs are accessible ✅ Production URL is updated
After successful deployment:
-
Set up custom domain (optional):
- Go to Vercel dashboard
- Project Settings → Domains
- Add custom domain
-
Configure Sentry (optional):
- Add SENTRY_AUTH_TOKEN to CircleCI
- Verify source maps upload
-
Enable deployment protection (optional):
- Vercel → Project Settings → Deployment Protection
- Configure branch protection rules
Setup Time: ~5 minutes Difficulty: Easy Status: Ready to deploy! 🚀