スキル一覧に戻る
MenadBt

deploy-stack

by MenadBt

0🍴 0📅 2026年1月8日
GitHubで見るManusで実行

SKILL.md


name: deploy-stack description: Deploys multiple components to an environment. Use for coordinated deployments of backend, frontend, and landing. allowed-tools: Bash(npx sst:), Bash(cd:), Bash(aws:*)

Deploy Stack

Deploys multiple components to an environment in the correct order.

Deployment Order

For a full stack deployment:

  1. Backend (first - frontend depends on API)
  2. Frontend (after backend API is available)
  3. Landing (independent, can be parallel)

Commands

Deploy All to Dev

# 1. Backend
cd back && npx sst deploy --stage dev

# 2. Frontend (after backend completes)
cd ../front && npx sst deploy --stage dev

# 3. Landing (can run in parallel with frontend)
cd ../landing && npx sst deploy --stage dev

Deploy All to Production

# 1. Backend
cd back && npx sst deploy --stage prod

# 2. Run migrations
aws lambda invoke --function-name template-saas-api-migrate-lambda-prod /dev/null

# 3. Frontend
cd ../front && npx sst deploy --stage prod

# 4. Landing
cd ../landing && npx sst deploy --stage prod

Pre-Deployment Checklist

Secrets

Ensure all secrets are set for the target stage:

Backend:

npx sst secret set DbConnStr "..." --stage <stage>
npx sst secret set ClerkSecretKey "..." --stage <stage>
npx sst secret set ClerkWebhookSecret "..." --stage <stage>

Frontend:

npx sst secret set ClerkPublishableKey "..." --stage <stage>
npx sst secret set ClerkSecretKey "..." --stage <stage>

Quality Checks

Run quality checks before deployment:

# Backend
cd back && task format && task tests

# Frontend
cd front && pnpm type-check && pnpm lint && pnpm build

# Landing
cd landing && pnpm type-check && pnpm lint && pnpm build

CI/CD Alternative

Manual stack deployment should only be needed for:

  • Initial setup
  • Emergency fixes
  • Development testing

For normal deployments, use CI/CD:

  • Push to develop → deploys to dev stage
  • Push to main → deploys to prod stage

Rollback

If deployment fails:

  1. Check SST console for errors:

    npx sst console --stage <stage>
    
  2. Check CloudWatch logs for Lambda errors

  3. For frontend: Previous CloudFront distribution remains until new deploy succeeds

  4. For backend: Revert code and redeploy

Domain Verification

After deployment, verify domains are accessible:

ComponentDevProd
Landingdev.{domain}{domain}
Frontendapp-dev.{domain}app.{domain}
Backendapi-dev.{domain}/healthapi.{domain}/health

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です