vercel-deploy
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePurpose
用途
Deploy an existing Vercel project to production from a local directory. Designed to never hang, never create new projects, and never assume implicit state.
从本地目录将现有Vercel项目部署到生产环境。设计为永不挂起、永不创建新项目、永不依赖隐式状态。
Required Secrets
必填密钥
Must be available as environment variables (from crew secret store):
- — Access token with deploy permissions (this is the only real secret)
VERCEL_TOKEN
必须作为环境变量(来自crew密钥存储)提供:
- — 具备部署权限的访问令牌(这是唯一的真实密钥)
VERCEL_TOKEN
Required Inputs
必填输入项
All inputs are passed as pairs in the skill invocation or task description. Parse them from the args — never read these from environment variables.
KEY=value- — Path to the deployable directory (e.g.,
DEPLOY_DIR, repo root)./ui - — Expected production domain (e.g.,
PROD_DOMAIN)pylot.fellowship.dev - — Organization/team ID (starts with
VERCEL_ORG_ID)team_ - — Project ID (starts with
VERCEL_PROJECT_ID)prj_
These values come from the repo playbook (), not from secrets. The operator reads the playbook and passes them when invoking this skill.
GET /admin/playbooks/<repo>所有输入项均以的形式在技能调用或任务描述中传递。从参数中解析这些值——切勿从环境变量中读取。
KEY=value- — 可部署目录的路径(例如
DEPLOY_DIR、仓库根目录)./ui - — 预期的生产域名(例如
PROD_DOMAIN)pylot.fellowship.dev - — 组织/团队ID(以
VERCEL_ORG_ID开头)team_ - — 项目ID(以
VERCEL_PROJECT_ID开头)prj_
这些值来自仓库操作手册(),而非密钥。操作人员会读取操作手册并在调用此技能时传递这些值。
GET /admin/playbooks/<repo>Optional Inputs
可选输入项
- — Git branch to deploy from. Defaults to
DEPLOY_BRANCHif not specified. Always checks out and pulls before deploying.main - — Git name of a verified Vercel team member (e.g.,
DEPLOY_AUTHOR). If provided along withmaxfindel, Stage 00 will fix the commit author before deploying. Only needed when Vercel enforces team membership on the commit author.DEPLOY_EMAIL - — Git email matching the author. Required if
DEPLOY_EMAILis set.DEPLOY_AUTHOR
- — 用于部署的Git分支。未指定时默认值为
DEPLOY_BRANCH。部署前始终会执行检出和拉取操作。main - — 已验证的Vercel团队成员的Git名称(例如
DEPLOY_AUTHOR)。如果与maxfindel一同提供,阶段00会在部署前修复提交作者。仅当Vercel要求提交作者必须是团队成员时才需要此项。DEPLOY_EMAIL - — 与作者匹配的Git邮箱。如果设置了
DEPLOY_EMAIL则为必填项。DEPLOY_AUTHOR
Forbidden Actions
禁止操作
- NEVER create a new Vercel project. If it doesn't exist, STOP and report failure.
- NEVER assume project auto-links. Always verify or write explicitly.
.vercel/project.json - NEVER connect a git repo to the Vercel project. All deploys are CLI pushes, not git-triggered.
- NEVER run without
verceland--token. The CLI hangs forever without them.--yes - NEVER run . It prompts interactively. Write
vercel linkdirectly..vercel/project.json - NEVER run or equivalent. Separate procedure exists for that.
vercel project create
- 切勿创建新的Vercel项目。如果项目不存在,立即停止并报告失败。
- 切勿假设项目已自动关联。始终显式验证或写入。
.vercel/project.json - 切勿将Git仓库连接到Vercel项目。所有部署均通过CLI推送完成,而非Git触发。
- 切勿在不添加和
--token的情况下运行--yes。没有这些参数,CLI会无限挂起。vercel - 切勿运行。该命令会触发交互式提示。直接写入
vercel link即可。.vercel/project.json - 切勿运行或等效命令。创建项目有单独的流程。
vercel project create
Stage Overview
阶段概述
| Stage | Name | Purpose |
|---|---|---|
| 00 | author-fix | Fix commit author if DEPLOY_AUTHOR is set (optional, skipped otherwise) |
| 01 | preflight | Verify secrets, tools, compute deploy context |
| 02 | link | Ensure |
| 03 | deploy | Run |
| 04 | poll | Poll Vercel API until deployment reaches READY or ERROR |
| 05 | verify | Confirm production domain is reachable, emit outcome |
| 阶段 | 名称 | 用途 |
|---|---|---|
| 00 | author-fix | 若设置了DEPLOY_AUTHOR则修复提交作者(可选,否则跳过) |
| 01 | preflight | 验证密钥、工具,计算部署上下文 |
| 02 | link | 确保 |
| 03 | deploy | 以非交互方式运行 |
| 04 | poll | 轮询Vercel API直到部署进入READY或ERROR状态 |
| 05 | verify | 确认生产域名可访问,输出结果 |
Stage 00 — Author Fix (conditional)
阶段00 — 作者修复(可选)
Skip this stage if is not provided. Not all Vercel projects enforce team membership on commit authors.
DEPLOY_AUTHORWhen Vercel does enforce it ( / ), bot accounts (e.g. ) will block CLI deploys. The fix is an empty commit with a team member as author.
TEAM_ACCESS_REQUIREDseatBlockfry-lobsterbash
undefined如果未提供则跳过此阶段。并非所有Vercel项目都要求提交作者必须是团队成员。
DEPLOY_AUTHOR当Vercel启用该限制时( / ),机器人账号(例如 )会阻止CLI部署。解决方法是创建一个以团队成员为作者的空提交。
TEAM_ACCESS_REQUIREDseatBlockfry-lobsterbash
undefinedOnly run if DEPLOY_AUTHOR is set in the skill params
Only run if DEPLOY_AUTHOR is set in the skill params
if [ -n "$DEPLOY_AUTHOR" ] && [ -n "$DEPLOY_EMAIL" ]; then
HEAD_AUTHOR=$(git log -1 --format='%an')
if [ "$HEAD_AUTHOR" != "$DEPLOY_AUTHOR" ]; then
echo "[vercel-deploy] HEAD author '$HEAD_AUTHOR' is not a Vercel team member."
echo "[vercel-deploy] Creating empty commit with author '$DEPLOY_AUTHOR' to unblock deploy."
git commit --allow-empty
--author="$DEPLOY_AUTHOR <$DEPLOY_EMAIL>"
-m "chore: vercel deploy author fix (empty commit)" git push origin HEAD fi else echo "[vercel-deploy] Stage 00 skipped — no DEPLOY_AUTHOR configured" fi
--author="$DEPLOY_AUTHOR <$DEPLOY_EMAIL>"
-m "chore: vercel deploy author fix (empty commit)" git push origin HEAD fi else echo "[vercel-deploy] Stage 00 skipped — no DEPLOY_AUTHOR configured" fi
undefinedif [ -n "$DEPLOY_AUTHOR" ] && [ -n "$DEPLOY_EMAIL" ]; then
HEAD_AUTHOR=$(git log -1 --format='%an')
if [ "$HEAD_AUTHOR" != "$DEPLOY_AUTHOR" ]; then
echo "[vercel-deploy] HEAD author '$HEAD_AUTHOR' is not a Vercel team member."
echo "[vercel-deploy] Creating empty commit with author '$DEPLOY_AUTHOR' to unblock deploy."
git commit --allow-empty
--author="$DEPLOY_AUTHOR <$DEPLOY_EMAIL>"
-m "chore: vercel deploy author fix (empty commit)" git push origin HEAD fi else echo "[vercel-deploy] Stage 00 skipped — no DEPLOY_AUTHOR configured" fi
--author="$DEPLOY_AUTHOR <$DEPLOY_EMAIL>"
-m "chore: vercel deploy author fix (empty commit)" git push origin HEAD fi else echo "[vercel-deploy] Stage 00 skipped — no DEPLOY_AUTHOR configured" fi
undefinedStage 01 — Preflight
阶段01 — 预检
Verify all secrets and inputs exist, tools are installed, and checkout the deploy branch.
bash
undefined验证所有密钥和输入项是否存在、工具是否已安装,并检出部署分支。
bash
undefinedVerify required secret (from crew secret store — the only real secret)
Verify required secret (from crew secret store — the only real secret)
[ -z "$VERCEL_TOKEN" ] && { echo "[vercel-deploy] MISSING secret: VERCEL_TOKEN"; exit 1; }
[ -z "$VERCEL_TOKEN" ] && { echo "[vercel-deploy] MISSING secret: VERCEL_TOKEN"; exit 1; }
Verify required inputs (parsed from skill args / task description — from the repo playbook)
Verify required inputs (parsed from skill args / task description — from the repo playbook)
[ -z "$DEPLOY_DIR" ] && { echo "[vercel-deploy] MISSING input: DEPLOY_DIR — check the repo playbook"; exit 1; }
[ -z "$PROD_DOMAIN" ] && { echo "[vercel-deploy] MISSING input: PROD_DOMAIN — check the repo playbook"; exit 1; }
[ -z "$VERCEL_ORG_ID" ] && { echo "[vercel-deploy] MISSING input: VERCEL_ORG_ID — check the repo playbook"; exit 1; }
[ -z "$VERCEL_PROJECT_ID" ] && { echo "[vercel-deploy] MISSING input: VERCEL_PROJECT_ID — check the repo playbook"; exit 1; }
[ -z "$DEPLOY_DIR" ] && { echo "[vercel-deploy] MISSING input: DEPLOY_DIR — check the repo playbook"; exit 1; }
[ -z "$PROD_DOMAIN" ] && { echo "[vercel-deploy] MISSING input: PROD_DOMAIN — check the repo playbook"; exit 1; }
[ -z "$VERCEL_ORG_ID" ] && { echo "[vercel-deploy] MISSING input: VERCEL_ORG_ID — check the repo playbook"; exit 1; }
[ -z "$VERCEL_PROJECT_ID" ] && { echo "[vercel-deploy] MISSING input: VERCEL_PROJECT_ID — check the repo playbook"; exit 1; }
Optional: warn if author-fix params are incomplete (both or neither)
Optional: warn if author-fix params are incomplete (both or neither)
if [ -n "$DEPLOY_AUTHOR" ] && [ -z "$DEPLOY_EMAIL" ]; then
echo "[vercel-deploy] WARNING: DEPLOY_AUTHOR set but DEPLOY_EMAIL missing — Stage 00 will be skipped"
fi
if [ -n "$DEPLOY_AUTHOR" ] && [ -z "$DEPLOY_EMAIL" ]; then
echo "[vercel-deploy] WARNING: DEPLOY_AUTHOR set but DEPLOY_EMAIL missing — Stage 00 will be skipped"
fi
Verify vercel CLI is available
Verify vercel CLI is available
command -v vercel >/dev/null 2>&1 || command -v npx >/dev/null 2>&1 || {
echo "[vercel-deploy] vercel CLI not available — install with: npm i -g vercel"
exit 1
}
command -v vercel >/dev/null 2>&1 || command -v npx >/dev/null 2>&1 || {
echo "[vercel-deploy] vercel CLI not available — install with: npm i -g vercel"
exit 1
}
Verify deploy directory exists
Verify deploy directory exists
[ -d "$DEPLOY_DIR" ] || { echo "[vercel-deploy] DEPLOY_DIR not found: $DEPLOY_DIR"; exit 1; }
[ -d "$DEPLOY_DIR" ] || { echo "[vercel-deploy] DEPLOY_DIR not found: $DEPLOY_DIR"; exit 1; }
Checkout and pull deploy branch
Checkout and pull deploy branch
DEPLOY_BRANCH="${DEPLOY_BRANCH:-main}"
git checkout "$DEPLOY_BRANCH" && git pull origin "$DEPLOY_BRANCH" || {
echo "[vercel-deploy] Failed to checkout/pull $DEPLOY_BRANCH"
exit 1
}
DEPLOY_BRANCH="${DEPLOY_BRANCH:-main}"
git checkout "$DEPLOY_BRANCH" && git pull origin "$DEPLOY_BRANCH" || {
echo "[vercel-deploy] Failed to checkout/pull $DEPLOY_BRANCH"
exit 1
}
Save state for downstream stages
Save state for downstream stages
cat > /tmp/vercel-deploy-ctx.env <<EOF
DEPLOY_BRANCH=$DEPLOY_BRANCH
DEPLOY_DIR=$DEPLOY_DIR
PROD_DOMAIN=$PROD_DOMAIN
EOF
echo "[vercel-deploy] Stage 01 complete — preflight passed, branch: $DEPLOY_BRANCH"
undefinedcat > /tmp/vercel-deploy-ctx.env <<EOF
DEPLOY_BRANCH=$DEPLOY_BRANCH
DEPLOY_DIR=$DEPLOY_DIR
PROD_DOMAIN=$PROD_DOMAIN
EOF
echo "[vercel-deploy] Stage 01 complete — preflight passed, branch: $DEPLOY_BRANCH"
undefinedStage 02 — Link
阶段02 — 关联
Write directly (never use ), then verify the project exists via API.
.vercel/project.jsonvercel linkbash
source /tmp/vercel-deploy-ctx.env直接写入(切勿使用),然后通过API验证项目是否存在。
.vercel/project.jsonvercel linkbash
source /tmp/vercel-deploy-ctx.envWrite project link file directly
Write project link file directly
mkdir -p "$DEPLOY_DIR/.vercel"
cat > "$DEPLOY_DIR/.vercel/project.json" <<EOF
{
"orgId": "$VERCEL_ORG_ID",
"projectId": "$VERCEL_PROJECT_ID"
}
EOF
mkdir -p "$DEPLOY_DIR/.vercel"
cat > "$DEPLOY_DIR/.vercel/project.json" <<EOF
{
"orgId": "$VERCEL_ORG_ID",
"projectId": "$VERCEL_PROJECT_ID"
}
EOF
Verify project exists via Vercel API
Verify project exists via Vercel API
PROJECT_JSON=$(curl -sf
-H "Authorization: Bearer $VERCEL_TOKEN"
"https://api.vercel.com/v9/projects/$VERCEL_PROJECT_ID?teamId=$VERCEL_ORG_ID")
-H "Authorization: Bearer $VERCEL_TOKEN"
"https://api.vercel.com/v9/projects/$VERCEL_PROJECT_ID?teamId=$VERCEL_ORG_ID")
[ -z "$PROJECT_JSON" ] && {
echo "[vercel-deploy] Stage 02 failed: project $VERCEL_PROJECT_ID not found — STOP, do not create"
exit 1
}
PROJECT_NAME=$(echo "$PROJECT_JSON" | python3 -c
"import sys,json; d=json.load(sys.stdin); print(d.get('name','unknown'))" 2>/dev/null || echo "unknown")
"import sys,json; d=json.load(sys.stdin); print(d.get('name','unknown'))" 2>/dev/null || echo "unknown")
echo "PROJECT_NAME=$PROJECT_NAME" >> /tmp/vercel-deploy-ctx.env
echo "[vercel-deploy] Stage 02 complete — linked to project '$PROJECT_NAME' ($VERCEL_PROJECT_ID)"
undefinedPROJECT_JSON=$(curl -sf
-H "Authorization: Bearer $VERCEL_TOKEN"
"https://api.vercel.com/v9/projects/$VERCEL_PROJECT_ID?teamId=$VERCEL_ORG_ID")
-H "Authorization: Bearer $VERCEL_TOKEN"
"https://api.vercel.com/v9/projects/$VERCEL_PROJECT_ID?teamId=$VERCEL_ORG_ID")
[ -z "$PROJECT_JSON" ] && {
echo "[vercel-deploy] Stage 02 failed: project $VERCEL_PROJECT_ID not found — STOP, do not create"
exit 1
}
PROJECT_NAME=$(echo "$PROJECT_JSON" | python3 -c
"import sys,json; d=json.load(sys.stdin); print(d.get('name','unknown'))" 2>/dev/null || echo "unknown")
"import sys,json; d=json.load(sys.stdin); print(d.get('name','unknown'))" 2>/dev/null || echo "unknown")
echo "PROJECT_NAME=$PROJECT_NAME" >> /tmp/vercel-deploy-ctx.env
echo "[vercel-deploy] Stage 02 complete — linked to project '$PROJECT_NAME' ($VERCEL_PROJECT_ID)"
undefinedStage 03 — Deploy
阶段03 — 部署
Run non-interactively. Must use and — without them the CLI hangs.
vercel deploy --prod--token--yesbash
source /tmp/vercel-deploy-ctx.env
cd "$DEPLOY_DIR"
DEPLOY_OUTPUT=$(npx vercel deploy --prod --token="$VERCEL_TOKEN" --yes 2>&1)
DEPLOY_EXIT=$?
echo "$DEPLOY_OUTPUT"
if [ $DEPLOY_EXIT -ne 0 ]; then
echo "[vercel-deploy] Stage 03 failed: vercel deploy exited $DEPLOY_EXIT"
exit 1
fi以非交互方式运行。必须添加和参数——没有这些参数,CLI会挂起。
vercel deploy --prod--token--yesbash
source /tmp/vercel-deploy-ctx.env
cd "$DEPLOY_DIR"
DEPLOY_OUTPUT=$(npx vercel deploy --prod --token="$VERCEL_TOKEN" --yes 2>&1)
DEPLOY_EXIT=$?
echo "$DEPLOY_OUTPUT"
if [ $DEPLOY_EXIT -ne 0 ]; then
echo "[vercel-deploy] Stage 03 failed: vercel deploy exited $DEPLOY_EXIT"
exit 1
fiExtract deployment URL (last https:// line in output)
Extract deployment URL (last https:// line in output)
DEPLOY_URL=$(echo "$DEPLOY_OUTPUT" | grep -E '^https://' | tail -1)
[ -z "$DEPLOY_URL" ] && {
echo "[vercel-deploy] Stage 03 failed: no deployment URL found in vercel output"
exit 1
}
echo "DEPLOY_URL=$DEPLOY_URL" >> /tmp/vercel-deploy-ctx.env
echo "[vercel-deploy] Stage 03 complete — deployment URL: $DEPLOY_URL"
undefinedDEPLOY_URL=$(echo "$DEPLOY_OUTPUT" | grep -E '^https://' | tail -1)
[ -z "$DEPLOY_URL" ] && {
echo "[vercel-deploy] Stage 03 failed: no deployment URL found in vercel output"
exit 1
}
echo "DEPLOY_URL=$DEPLOY_URL" >> /tmp/vercel-deploy-ctx.env
echo "[vercel-deploy] Stage 03 complete — deployment URL: $DEPLOY_URL"
undefinedStage 04 — Poll
阶段04 — 轮询
Poll the Vercel API until the deployment reaches or . Timeout after 120 seconds.
READYERRORbash
source /tmp/vercel-deploy-ctx.env
MAX_WAIT=120
ELAPSED=0
DEPLOY_HOST=$(echo "$DEPLOY_URL" | sed 's|https://||')
while [ $ELAPSED -lt $MAX_WAIT ]; do
DEPLOY_STATE=$(curl -sf \
-H "Authorization: Bearer $VERCEL_TOKEN" \
"https://api.vercel.com/v13/deployments?url=${DEPLOY_HOST}&teamId=$VERCEL_ORG_ID&limit=1" \
| python3 -c \
"import sys,json; d=json.load(sys.stdin); deps=d.get('deployments',[]); print(deps[0].get('state','UNKNOWN') if deps else 'NOT_FOUND')" \
2>/dev/null || echo "API_ERROR")
echo "[vercel-deploy] Deploy state: $DEPLOY_STATE (${ELAPSED}s elapsed)"
case "$DEPLOY_STATE" in
READY)
echo "[vercel-deploy] Stage 04 complete — deployment READY"
break
;;
ERROR|CANCELED)
echo "[vercel-deploy] Stage 04 failed: deployment reached terminal state $DEPLOY_STATE"
exit 1
;;
*)
sleep 10
ELAPSED=$((ELAPSED + 10))
;;
esac
done
[ $ELAPSED -ge $MAX_WAIT ] && {
echo "[vercel-deploy] Stage 04 failed: timed out after ${MAX_WAIT}s — last state: $DEPLOY_STATE"
exit 1
}轮询Vercel API直到部署进入或状态。120秒后超时。
READYERRORbash
source /tmp/vercel-deploy-ctx.env
MAX_WAIT=120
ELAPSED=0
DEPLOY_HOST=$(echo "$DEPLOY_URL" | sed 's|https://||')
while [ $ELAPSED -lt $MAX_WAIT ]; do
DEPLOY_STATE=$(curl -sf \
-H "Authorization: Bearer $VERCEL_TOKEN" \
"https://api.vercel.com/v13/deployments?url=${DEPLOY_HOST}&teamId=$VERCEL_ORG_ID&limit=1" \
| python3 -c \
"import sys,json; d=json.load(sys.stdin); deps=d.get('deployments',[]); print(deps[0].get('state','UNKNOWN') if deps else 'NOT_FOUND')" \
2>/dev/null || echo "API_ERROR")
echo "[vercel-deploy] Deploy state: $DEPLOY_STATE (${ELAPSED}s elapsed)"
case "$DEPLOY_STATE" in
READY)
echo "[vercel-deploy] Stage 04 complete — deployment READY"
break
;;
ERROR|CANCELED)
echo "[vercel-deploy] Stage 04 failed: deployment reached terminal state $DEPLOY_STATE"
exit 1
;;
*)
sleep 10
ELAPSED=$((ELAPSED + 10))
;;
esac
done
[ $ELAPSED -ge $MAX_WAIT ] && {
echo "[vercel-deploy] Stage 04 failed: timed out after ${MAX_WAIT}s — last state: $DEPLOY_STATE"
exit 1
}Stage 05 — Verify
阶段05 — 验证
Confirm the production domain is reachable (HTTP 200, 301, or 302), then emit outcome.
bash
source /tmp/vercel-deploy-ctx.env
VERIFY_URL="https://$PROD_DOMAIN"
HTTP_STATUS=$(curl -sf -o /dev/null -w "%{http_code}" --max-time 15 "$VERIFY_URL" 2>/dev/null || echo "000")
echo "[vercel-deploy] $VERIFY_URL → HTTP $HTTP_STATUS"
case "$HTTP_STATUS" in
200|301|302)
echo "[vercel-deploy] Stage 05 complete — production domain verified"
echo "[pylot] outcome=\"vercel-deploy succeeded\" project=$PROJECT_NAME domain=$PROD_DOMAIN deploy_url=$DEPLOY_URL status=done"
;;
*)
echo "[vercel-deploy] Stage 05 failed: $VERIFY_URL returned HTTP $HTTP_STATUS"
echo "[pylot] outcome=\"vercel-deploy failed at stage 05: $PROD_DOMAIN returned HTTP $HTTP_STATUS\" status=failed"
exit 1
;;
esac确认生产域名可访问(HTTP状态码为200、301或302),然后输出结果。
bash
source /tmp/vercel-deploy-ctx.env
VERIFY_URL="https://$PROD_DOMAIN"
HTTP_STATUS=$(curl -sf -o /dev/null -w "%{http_code}" --max-time 15 "$VERIFY_URL" 2>/dev/null || echo "000")
echo "[vercel-deploy] $VERIFY_URL → HTTP $HTTP_STATUS"
case "$HTTP_STATUS" in
200|301|302)
echo "[vercel-deploy] Stage 05 complete — production domain verified"
echo "[pylot] outcome=\"vercel-deploy succeeded\" project=$PROJECT_NAME domain=$PROD_DOMAIN deploy_url=$DEPLOY_URL status=done"
;;
*)
echo "[vercel-deploy] Stage 05 failed: $VERIFY_URL returned HTTP $HTTP_STATUS"
echo "[pylot] outcome=\"vercel-deploy failed at stage 05: $PROD_DOMAIN returned HTTP $HTTP_STATUS\" status=failed"
exit 1
;;
esacExecution Model
执行模型
- Follow stages in order. Each stage's checkpoint must pass before proceeding.
- Do not skip stages. Every checkpoint is verified.
- Fail fast. If any checkpoint fails, stop and report with .
status=failed - State is passed between stages via .
/tmp/vercel-deploy-ctx.env
- 按顺序执行各个阶段。必须通过当前阶段的检查点才能进入下一阶段。
- 切勿跳过阶段。每个检查点都会被验证。
- 快速失败。如果任何检查点失败,立即停止并报告。
status=failed - 阶段间通过传递状态。
/tmp/vercel-deploy-ctx.env
Critical Rules
关键规则
- Sequential execution only. Stage N's checkpoint must pass before starting stage N+1.
- No skipping. Every stage runs, every checkpoint is verified.
- Fail fast. If any checkpoint fails, stop and report.
- Every or
vercelinvocation MUST includenpx vercel.--token="$VERCEL_TOKEN" --yes
- 仅允许顺序执行。阶段N的检查点通过后才能启动阶段N+1。
- 不得跳过任何阶段。每个阶段都会运行,每个检查点都会被验证。
- 快速失败。如果任何检查点失败,立即停止并报告。
- 每次调用或
vercel必须包含npx vercel参数。--token="$VERCEL_TOKEN" --yes
Error Handling
错误处理
If any stage fails:
- Print which stage failed and the exact error
- Include the Vercel API response body if available
- Emit:
[pylot] outcome="vercel-deploy failed at stage <NN>: <reason>" status=failed - Do NOT retry automatically
如果任何阶段失败:
- 打印失败的阶段和具体错误
- 如果有Vercel API响应体,一并包含
- 输出:
[pylot] outcome="vercel-deploy failed at stage <NN>: <reason>" status=failed - 切勿自动重试
Outcome
结果
On success, emit:
[pylot] outcome="vercel-deploy succeeded" project=$PROJECT_NAME domain=$PROD_DOMAIN deploy_url=$DEPLOY_URL status=done成功时输出:
[pylot] outcome="vercel-deploy succeeded" project=$PROJECT_NAME domain=$PROD_DOMAIN deploy_url=$DEPLOY_URL status=done