Back to Cheatsheets
DevOps

Deployment

Deploying to various platforms

Vercel (Next.js)

4 items
CommandDescription
npm i -g vercel
Install CLI
vercel login
Authenticate
vercel
Deploy preview
vercel --prod
Deploy production

Environment Variables

3 items
CommandDescription
.env.local
Local secrets (gitignored)
process.env.KEY
Access in code
NEXT_PUBLIC_KEY
Expose to client

Checklist

3 items
CommandDescription
Build Check
Run npm run build locally
Lint Check
Run npm run lint
Type Check
Ensure no TS errors