Community编程与开发github.com

部署流水线 (Stripe / Supabase / Vercel)

使用 Composio CLI 一键运行涵盖 Stripe、Supabase 和 Vercel 的端到端部署流水线。从同一个脚本完成 Stripe 产品/价格更新、Supabase 数据库迁移、Vercel 前端部署以及部署后验证。

Supabase / Vercel) 是什么?

该技能提供了一个完整的部署流水线自动化方案,适用于全栈产品发布、预览环境转生产环境、以及周期性发布场景。它通过 Composio CLI 集成了 Stripe(产品与价格管理)、Supabase(数据库迁移与查询)和 Vercel(前端部署与推广)三大服务,并包含部署后验证与 Slack 公告通知。技能详细描述了从价格创建、数据库迁移、前端部署到健康检查的完整流程,并提供了 TypeScript 工作流脚本示例,支持参数化运行。此外还包含了回滚计划(按逆序撤销变更)和常见问题排查指南。该技能支持所有基于 Composio 的 AI 代理平台(如 Claude Code、Cursor 等),适合需要可靠、可重复的多服务协调部署的开发团队。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComposioHQ/awesome-codex-skills/tree/main/deploy-pipeline

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Supabase / Vercel) 是做什么的?

使用 Composio CLI 从 shell 协调跨 Stripe、Supabase 和 Vercel 的分阶段发布。一个脚本即可启动整个“发布”序列:产品/价格更新、数据库迁移、前端部署、冒烟检查、更新日志发布。

何时使用

  • 涉及计费、数据库和前端的全栈产品上线。
  • 将预览版 Vercel 构建推广到生产环境,同时需要切换 Stripe 价格并执行 Supabase 迁移。
  • 每周发布列车,序列重复出现,希望流程可靠。

前置条件

curl -fsSL https://composio.dev/install | bash
composio login
composio link stripe
composio link supabase
composio link vercel
composio link slack        # 用于发布公告

发现工具

composio search "create price" --toolkits stripe
composio search "apply migration" --toolkits supabase
composio search "create deployment" --toolkits vercel
composio tools list stripe
composio tools list supabase
composio tools list vercel

常用 slug(使用 --get-schema 验证):

Stripe

  • STRIPE_CREATE_PRODUCT
  • STRIPE_CREATE_PRICE
  • STRIPE_UPDATE_PRODUCT
  • STRIPE_LIST_PRICES

Supabase

  • SUPABASE_LIST_PROJECTS
  • SUPABASE_RUN_SQL_QUERY
  • SUPABASE_LIST_MIGRATIONS
  • SUPABASE_APPLY_MIGRATION

Vercel

  • VERCEL_CREATE_A_NEW_DEPLOYMENT
  • VERCEL_GET_A_DEPLOYMENT_BY_ID_OR_URL
  • VERCEL_LIST_DEPLOYMENTS
  • VERCEL_PROMOTE_DEPLOYMENT

流水线

执行顺序非常重要:Stripe → Supabase → Vercel → 验证 → 公告。 计费变更先于数据库,数据库先于前端。

1. Stripe:创建或更新价格

composio execute STRIPE_CREATE_PRICE -d '{
  "product":"prod_abc123",
  "unit_amount":2900,
  "currency":"usd",
  "recurring":{"interval":"month"},
  "lookup_key":"team-plan-v2"
}'

2. Supabase:应用迁移

composio execute SUPABASE_APPLY_MIGRATION -d '{
  "project_id":"abcxyz",
  "name":"add_team_tier_column",
  "query":"alter table teams add column tier text default 'free';"
}'

迁移后对 schema 进行健康检查:

composio execute SUPABASE_RUN_SQL_QUERY -d '{
  "project_id":"abcxyz",
  "query":"select column_name from information_schema.columns where table_name='teams' and column_name='tier';"
}'

3. Vercel:部署 + 推广

# 从 git 引用触发生产部署
composio execute VERCEL_CREATE_A_NEW_DEPLOYMENT -d '{
  "name":"web",
  "target":"production",
  "gitSource":{"type":"github","ref":"main","repoId":123456}
}'

轮询直到就绪:

composio execute VERCEL_GET_A_DEPLOYMENT_BY_ID_OR_URL -d '{"idOrUrl":"dpl_xxx"}' \
  | jq '.readyState'

4. 验证

curl -fsS https://app.acme.com/api/health
composio execute SUPABASE_RUN_SQL_QUERY -d '{
  "project_id":"abcxyz","query":"select count(*) from teams where tier is null;"
}'

5. 公告

composio execute SLACK_SEND_MESSAGE -d '{
  "channel":"releases",
  "text":"✅ Team Plan v2 已发布。Stripe 价格 `team-plan-v2` 生效,Supabase 迁移已应用,Vercel 生产环境已推广。"
}'

流水线工作流文件

scripts/ship.ts,使用 composio run --file scripts/ship.ts -- --ref main 运行:

const ref = process.argv[process.argv.indexOf("--ref") + 1] ?? "main";

// 1. Stripe
const price = await execute("STRIPE_CREATE_PRICE", {
  product: "prod_abc123", unit_amount: 2900, currency: "usd",
  recurring: { interval: "month" }, lookup_key: "team-plan-v2"
});

// 2. Supabase
await execute("SUPABASE_APPLY_MIGRATION", {
  project_id: "abcxyz",
  name: "add_team_tier_column",
  query: "alter table teams add column tier text default 'free';"
});

// 3. Vercel
const dep = await execute("VERCEL_CREATE_A_NEW_DEPLOYMENT", {
  name: "web", target: "production",
  gitSource: { type: "github", ref, repoId: 123456 }
});

// 4. 等待就绪
let state = "QUEUED";
while (state !== "READY" && state !== "ERROR") {
  await new Promise(r => setTimeout(r, 4000));
  const d = await execute("VERCEL_GET_A_DEPLOYMENT_BY_ID_OR_URL", { idOrUrl: dep.id });
  state = d.readyState;
}

if (state !== "READY") throw new Error("Vercel 部署失败");

// 5. 公告
await execute("SLACK_SEND_MESSAGE", {
  channel: "releases",
  text: `✅ 已发布 ${ref}。Stripe 价格 ${price.id},Vercel ${dep.url}。`
});

回滚计划

如果验证失败,按相反顺序撤销:

  1. Vercel:使用 VERCEL_PROMOTE_DEPLOYMENT 回退到上一个部署 ID。
  2. Supabase:应用 down 迁移(始终在发布前编写配套的 down.sql)。
  3. Stripe:使用 STRIPE_UPDATE_PRODUCT 隐藏新价格(active:false);不要删除 —— Stripe 对象实际上是不可变的,会影响历史发票。
  4. Slack:公告回滚。

故障排查

  • Stripe 价格已可见但结账仍然显示旧价格 → 检查应用端缓存;确认 lookup_key 与结账获取的键一致。
  • Supabase 迁移挂起 → 另一连接持有锁;执行 select pid, state, query from pg_stat_activity where state <> 'idle';。
  • Vercel 部署卡在 QUEUED → 通过 VERCEL_GET_A_DEPLOYMENT_BY_ID_OR_URL 并附加 ?logs=1 查看构建日志。
  • 顺序错误(前端在迁移应用前读取了列) → 始终序列化流水线;绝不要跨 Stripe/Supabase/Vercel 使用 --parallel。

完整 CLI 文档:docs.composio.dev/docs/cli

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComposioHQ/-21risk-automation

Automate 21risk tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/-2chat-automation

Automate 2chat tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/ably-automation

Automate Ably tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abstract-automation

Automate Abstract tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abuselpdb-automation

Automate Abuselpdb tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abyssale-automation

Automate Abyssale tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accelo-automation

Automate Accelo tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accredible-certificates-automation

Automate Accredible Certificates tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/acculynx-automation

Automate Acculynx tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/active-campaign-automation

Automate ActiveCampaign tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/addresszen-automation

Automate Addresszen tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adobe-automation

Automate Adobe tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adrapid-automation

Automate Adrapid tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adyntel-automation

Automate Adyntel tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aeroleads-automation

Automate Aeroleads tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aero-workflow-automation

Automate Aero Workflow tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinda-automation

Automate Affinda tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinity-automation

Automate Affinity tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agencyzoom-automation

Automate Agencyzoom tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agent-deep-links

Build, validate, and troubleshoot deep links for Codex, Cursor, VS Code, Visual Studio, and similar tools. Use when users ask for clickable links (especially in Slack) that open threads, files, folders, or app settings.

相关技能