vercel-deploy

📁 chloezhu010/vibe-ship 📅 4 days ago
2
总安装量
2
周安装量
#67692
全站排名
安装命令
npx skills add https://github.com/chloezhu010/vibe-ship --skill vercel-deploy

Agent 安装分布

amp 2
github-copilot 2
codex 2
kimi-cli 2
gemini-cli 2
cursor 2

Skill 文档

Vercel Deploy

Deploy the project to Vercel and push all environment variables.

This skill is called by the vibe-ship orchestrator. FRAMEWORK = nextjs or vite.

1. Add SPA rewrite rule (Vite only)

Skip this step entirely for Next.js.

If FRAMEWORK = vite — create vercel.json at the project root:

{
  "rewrites": [{ "source": "/(.*)", "destination": "/index.html" }]
}

This prevents 404 errors when users navigate directly to a URL (e.g. /dashboard) in a single-page app.

Commit the file before deploying:

git add vercel.json && git commit -m "chore: add Vercel SPA rewrite rule"

2. Set up Vercel

Invoke vercel:setup.

This installs the Vercel CLI if missing, links the project to a Vercel account, and creates a new project if one doesn’t exist.

3. Push environment variables

Print the list of keys that need to be added to Vercel:

grep -v '^#' .env.local | grep '=' | cut -d= -f1

Ask the user to add each key to Vercel by running this command for each one — they’ll be prompted to paste the value securely:

vercel env add <KEY_NAME> production

If a key already exists on Vercel, the CLI will ask to overwrite — confirm with y.

4. Deploy

Invoke vercel:deploy.

5. Update Supabase site_url

Capture the production URL from the deploy output and update supabase/config.toml so magic link emails redirect to the live app instead of localhost:

[auth]
site_url = "https://<your-vercel-url>.vercel.app"
additional_redirect_urls = ["http://localhost:5173", "http://localhost:3000"]

Ask the user to push the updated config by running in their terminal:

supabase config push

This ensures magic links work in both local dev and production without any config changes between environments.

6. Validate

After the deploy completes, open the printed live URL and confirm:

  • The app loads without a blank screen or error
  • The login page is reachable
  • Data loads from Supabase

If anything looks wrong, invoke vercel:logs to inspect the deployment output.

Report: “✓ Deployed. Live at: “