| name | vercel-deploy-preview |
| description | Create and manage Vercel preview deployments for branches and pull requests.
Use when deploying a preview for a pull request, testing changes before production,
or sharing preview URLs with stakeholders.
Trigger with phrases like "vercel deploy preview", "vercel preview URL",
"create preview deployment", "vercel PR preview".
|
| allowed-tools | Read, Write, Edit, Bash(vercel:*), Bash(curl:*), Bash(git:*), Grep |
| version | 1.18.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","vercel","deployment","preview","workflow"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Vercel Deploy Preview
Overview
Deploy preview environments for branches and pull requests. Every git push to a non-production branch generates a unique preview URL. Covers CLI-based previews, API-based previews, deployment protection, and comment integration.
Prerequisites
- Completed
vercel-install-auth setup
- Project linked via
vercel link
- Git repository connected in Vercel dashboard
Instructions
Step 1: Deploy Preview via CLI
vercel
vercel ./dist
vercel --no-wait
Step 2: Deploy Preview via REST API
curl -X POST "https://api.vercel.com/v13/deployments" \
-H "Authorization: Bearer $VERCEL_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "my-app",
"target": "preview",
"gitSource": {
"type": "github",
"repoId": "123456789",
"ref": "feature/new-feature",
"sha": "abc123def456"
}
}'
Step 3: Check Deployment Status
curl -s -H "Authorization: Bearer $VERCEL_TOKEN" \
"https://api.vercel.com/v13/deployments/dpl_xxxxxxxxxxxx" \
| jq '{state: .state, url: .url, readyState: .readyState}'
async () {
() {
d = client.(deploymentId);
(d. === ) d;
(d. === || d. === ) {
();
}
( (r, ));
}
}