Vercel Deployment Skill
Goal: Seamlessly deploy any frontend/full-stack application to Vercel global edge network.
1. Prerequisites
- •CLI:
vercel(Install vianpm i -g vercel) - •Auth: User must be logged in (
vercel login) or provideVERCEL_TOKEN.
2. Deployment Workflow
- •
Detection:
- •Scanner checks
package.jsonfor frameworks (Next.js, Vite, Remix, Astro). - •Identifies build command (
npm run build) and output directory (distor.next).
- •Scanner checks
- •
Configuration:
- •Generates
vercel.jsonif custom headers/rewrites are needed. - •Sets project settings (Root Directory, Framework Preset).
- •Generates
- •
Execution:
- •Preview:
vercel --no-prod(For testing feature branches). - •Production:
vercel --prod(For live release).
- •Preview:
- •
Verification:
- •Checks deployment status via
vercel inspect <url>. - •Returns the Claimable URL for the user.
- •Checks deployment status via
3. Environment Variables
- •Auto-Sync: Pulls
.envfrom Vercel Project Settings (vercel env pull). - •Push: Pushes local
.envto Vercel (Interactive confirmation required).
4. Troubleshooting common errors
- •Build Fail: Usually due to strict type checking or linting in CI. Suggest
ignoreBuildErrors: trueONLY for hotfixes. - •Missing Secrets: Check if
VERCEL_TOKENis active in CI/CD environment.
Command Reference:
- •
vercel link: Link local folder to remote project. - •
vercel deploy: Deploy preview. - •
vercel deploy --prod: Deploy production.