vercel-deploy

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Vercel Deploy

Vercel 部署

Deploy any project to Vercel instantly. No authentication required.
即时将任何项目部署到Vercel。无需身份验证。

How It Works

工作原理

  1. Packages your project into a tarball (excludes
    node_modules
    and
    .git
    )
  2. Auto-detects framework from
    package.json
  3. Uploads to deployment service
  4. Returns Preview URL (live site) and Claim URL (transfer to your Vercel account)
  1. 将你的项目打包为tarball格式(排除
    node_modules
    .git
    目录)
  2. package.json
    自动检测框架
  3. 上传至部署服务
  4. 返回预览URL(线上站点)和认领URL(转移到你的Vercel账户)

Usage

使用方法

bash
bash /mnt/skills/user/vercel-deploy/scripts/deploy.sh [path]
Arguments:
  • path
    - Directory to deploy, or a
    .tgz
    file (defaults to current directory)
Examples:
bash
undefined
bash
bash /mnt/skills/user/vercel-deploy/scripts/deploy.sh [path]
参数:
  • path
    - 要部署的目录,或
    .tgz
    文件(默认值为当前目录)
示例:
bash
undefined

Deploy current directory

部署当前目录

bash /mnt/skills/user/vercel-deploy/scripts/deploy.sh
bash /mnt/skills/user/vercel-deploy/scripts/deploy.sh

Deploy specific project

部署指定项目

bash /mnt/skills/user/vercel-deploy/scripts/deploy.sh /path/to/project
bash /mnt/skills/user/vercel-deploy/scripts/deploy.sh /path/to/project

Deploy existing tarball

部署已有的tarball包

bash /mnt/skills/user/vercel-deploy/scripts/deploy.sh /path/to/project.tgz
undefined
bash /mnt/skills/user/vercel-deploy/scripts/deploy.sh /path/to/project.tgz
undefined

Output

输出

Preparing deployment...
Detected framework: nextjs
Creating deployment package...
Deploying...
✓ Deployment successful!

Preview URL: https://skill-deploy-abc123.vercel.app
Claim URL:   https://vercel.com/claim-deployment?code=...
The script also outputs JSON to stdout for programmatic use:
json
{
  "previewUrl": "https://skill-deploy-abc123.vercel.app",
  "claimUrl": "https://vercel.com/claim-deployment?code=...",
  "deploymentId": "dpl_...",
  "projectId": "prj_..."
}
Preparing deployment...
Detected framework: nextjs
Creating deployment package...
Deploying...
✓ Deployment successful!

Preview URL: https://skill-deploy-abc123.vercel.app
Claim URL:   https://vercel.com/claim-deployment?code=...
该脚本还会向标准输出(stdout)输出JSON格式内容,供程序化调用:
json
{
  "previewUrl": "https://skill-deploy-abc123.vercel.app",
  "claimUrl": "https://vercel.com/claim-deployment?code=...",
  "deploymentId": "dpl_...",
  "projectId": "prj_..."
}

Framework Detection

框架检测

The script auto-detects frameworks from
package.json
. Supported frameworks include:
  • React: Next.js, Gatsby, Create React App, Remix, React Router
  • Vue: Nuxt, Vitepress, Vuepress, Gridsome
  • Svelte: SvelteKit, Svelte, Sapper
  • Other Frontend: Astro, Solid Start, Angular, Ember, Preact, Docusaurus
  • Backend: Express, Hono, Fastify, NestJS, Elysia, h3, Nitro
  • Build Tools: Vite, Parcel
  • And more: Blitz, Hydrogen, RedwoodJS, Storybook, Sanity, etc.
For static HTML projects (no
package.json
), framework is set to
null
.
该脚本会从
package.json
自动检测框架。支持的框架包括:
  • React:Next.js、Gatsby、Create React App、Remix、React Router
  • Vue:Nuxt、Vitepress、Vuepress、Gridsome
  • Svelte:SvelteKit、Svelte、Sapper
  • 其他前端框架:Astro、Solid Start、Angular、Ember、Preact、Docusaurus
  • 后端框架:Express、Hono、Fastify、NestJS、Elysia、h3、Nitro
  • 构建工具:Vite、Parcel
  • 更多:Blitz、Hydrogen、RedwoodJS、Storybook、Sanity等
对于静态HTML项目(无
package.json
),框架会被设置为
null

Static HTML Projects

静态HTML项目

For projects without a
package.json
:
  • If there's a single
    .html
    file not named
    index.html
    , it gets renamed automatically
  • This ensures the page is served at the root URL (
    /
    )
对于没有
package.json
的项目:
  • 如果存在单个非
    index.html
    .html
    文件,会自动重命名
  • 确保页面可在根URL(
    /
    )访问

Present Results to User

向用户展示结果

Always show both URLs:
✓ Deployment successful!

Preview URL: https://skill-deploy-abc123.vercel.app
Claim URL:   https://vercel.com/claim-deployment?code=...

View your site at the Preview URL.
To transfer this deployment to your Vercel account, visit the Claim URL.
请始终展示两个URL:
✓ Deployment successful!

Preview URL: https://skill-deploy-abc123.vercel.app
Claim URL:   https://vercel.com/claim-deployment?code=...

View your site at the Preview URL.
To transfer this deployment to your Vercel account, visit the Claim URL.

Troubleshooting

故障排除

Network Egress Error

网络出口错误

If deployment fails due to network restrictions (common on claude.ai), tell the user:
Deployment failed due to network restrictions. To fix this:

1. Go to https://claude.ai/settings/capabilities
2. Add *.vercel.com to the allowed domains
3. Try deploying again
如果由于网络限制导致部署失败(在claude.ai上常见),请告知用户:
Deployment failed due to network restrictions. To fix this:

1. Go to https://claude.ai/settings/capabilities
2. Add *.vercel.com to the allowed domains
3. Try deploying again