Community程式設計與開發github.com

ComposioHQ/deploy-pipeline

使用 Composio CLI 在 Stripe、Supabase 和 Vercel 上執行端到端部署管線。從一個腳本中推廣 Stripe 產品、推送 Supabase 遷移、部署 Vercel,並透過部署後檢查進行驗證。

deploy-pipeline 是什麼?

這個技能提供了一個協調式的部署管線,讓開發者能夠透過 Composio CLI 從單一腳本,在 Stripe、Supabase 和 Vercel 上執行多步驟的釋出流程。它涵蓋了產品與價格更新、資料庫遷移、前端部署、部署後健康檢查以及 Slack 公告,特別適合需要同時觸及計費、資料庫和前端的全端產品啟動,或是每週的例行釋出。技能支援以 Shell 指令逐步執行,也提供 TypeScript 格式的工作流程檔案,方便自動化與重複執行。它也包含了實用的除錯提示與復原計畫,確保在錯誤發生時能依序回退,降低發布風險。

相容平台~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 的新對話。

說明文件

部署管線 (Stripe / Supabase / Vercel)

透過 Composio CLI 從命令列協調 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

常用代號 (請使用 --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';"
}'

遷移後執行結構驗證:

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.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.

相關技能