# Vercel Deploy

> Automated Vercel deployment skill.

Automated Vercel deployment skill.

- Page: https://ss33.ai/skills/dokhacgiakhoa/vercel-deploy-2028948424
- Publisher: dokhacgiakhoa
- Category: [Software Development](https://ss33.ai/skills/category/software-development-t44z8z) › [DevOps & cloud](https://ss33.ai/skills/category/software-development-t44z8z/devops-and-cloud-unkt50)
- License: MIT
- Source: https://github.com/dokhacgiakhoa/agent-skills-4-vibe-coding-cli/blob/c4a059bbf7a8d6b2162071f0fbfe74053faa6d20/.agent/skills/vercel-deploy/SKILL.md

## Skill

SKILL.md: https://ss33.ai/api/v1/ss33/download/dokhacgiakhoa/vercel-deploy-2028948424

# Vercel Deployment Skill

> **Goal**: Seamlessly deploy any frontend/full-stack application to Vercel global edge network.

## 1. Prerequisites

- **CLI**: `vercel` (Install via `npm i -g vercel`)
- **Auth**: User must be logged in (`vercel login`) or provide `VERCEL_TOKEN`.

## 2. Deployment Workflow

1.  **Detection**:
    - Scanner checks `package.json` for frameworks (Next.js, Vite, Remix, Astro).
    - Identifies build command (`npm run build`) and output directory (`dist` or `.next`).

2.  **Configuration**:
    - Generates `vercel.json` if custom headers/rewrites are needed.
    - Sets project settings (Root Directory, Framework Preset).

3.  **Execution**:
    - **Preview**: `vercel --no-prod` (For testing feature branches).
    - **Production**: `vercel --prod` (For live release).

4.  **Verification**:
    - Checks deployment status via `vercel inspect <url>`.
    - Returns the **Claimable URL** for the user.

## 3. Environment Variables

- **Auto-Sync**: Pulls `.env` from Vercel Project Settings (`vercel env pull`).
- **Push**: Pushes local `.env` to Vercel (Interactive confirmation required).

## 4. Troubleshooting common errors

- **Build Fail**: Usually due to strict type checking or linting in CI. Suggest `ignoreBuildErrors: true` ONLY for hotfixes.
- **Missing Secrets**: Check if `VERCEL_TOKEN` is active in CI/CD environment.

---

**Command Reference**:
- `vercel link`: Link local folder to remote project.
- `vercel deploy`: Deploy preview.
- `vercel deploy --prod`: Deploy production.
