skills/vercel-cli/references/ci-automation.md
Use VERCEL_TOKEN env var (not --token — it leaks in process listings). Use --scope if the token has access to multiple teams.
vercel pull --yes --environment=production
vercel build --prod
vercel deploy --prebuilt --prod
For multi-project monorepos, ensure vercel link --repo --yes has been run first.
Use --standalone so build artifacts are self-contained and can be passed between jobs:
jobs:
build:
steps:
- run: vercel pull --yes --environment=production
- run: vercel build --prod --standalone
- uses: actions/upload-artifact@v4
with:
name: vercel-build
path: .vercel/output
deploy:
needs: build
steps:
- uses: actions/download-artifact@v4
with:
name: vercel-build
path: .vercel/output
- run: vercel deploy --prebuilt --prod
Without --standalone, the deploy job will fail because artifacts reference files outside .vercel/output/.
URL=$(vercel deploy --prod) # stdout = URL, stderr = progress
--yes to skip promptsVERCEL_TOKEN env var for auth--scope if the token has access to multiple teamsvercel build + vercel deploy --prebuilt for deterministic builds.vercel/ — project.json vs repo.json is the most common issue