ai-factory.deploy

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Deployment Assistant

部署助手

Help prepare and execute deployments safely with automated checks and documentation.
借助自动化检查和文档工具,安全地准备并执行部署操作。

Behavior

行为逻辑

Without Arguments (Pre-flight Checks Only)

无参数调用(仅执行预部署检查)

Run deployment readiness checks:
  1. Git Status Check
    • Ensure working directory is clean
    • Verify on correct branch
    • Check if branch is up to date with remote
  2. Build Check
    • Run build command (
      npm run build
      ,
      cargo build
      , etc.)
    • Report any build errors
  3. Test Check
    • Run test suite
    • Report coverage if available
  4. Environment Check
    • Verify required environment variables
    • Check
      .env.example
      vs actual env
  5. Dependency Check
    • Look for security vulnerabilities (
      npm audit
      , etc.)
    • Check for outdated critical packages
运行部署就绪性检查:
  1. Git状态检查
    • 确保工作目录干净
    • 验证当前处于正确分支
    • 检查分支是否与远程仓库保持同步
  2. 构建检查
    • 执行构建命令(
      npm run build
      cargo build
      等)
    • 报告所有构建错误
  3. 测试检查
    • 运行测试套件
    • 若有可用数据则报告测试覆盖率
  4. 环境检查
    • 验证所需环境变量是否已配置
    • 对比
      .env.example
      与实际环境配置
  5. 依赖项检查
    • 排查安全漏洞(如
      npm audit
      等工具)
    • 检查是否存在需要更新的关键依赖包

With Environment Argument

带环境参数调用

/ai-factory.deploy staging

/ai-factory.deploy staging

  1. Run pre-flight checks
  2. Generate changelog since last staging deploy
  3. Provide deployment commands for staging environment
  4. Tag release as staging-{date}
  1. 执行预部署检查
  2. 生成自上次预发布环境部署以来的变更日志
  3. 提供预发布环境的部署命令
  4. 将版本标记为staging-{日期}

/ai-factory.deploy production

/ai-factory.deploy production

  1. Run ALL pre-flight checks (more strict)
  2. Require clean git status
  3. Require all tests passing
  4. Generate full release notes
  5. Create git tag for release
  6. Provide production deployment commands
  1. 执行全部预部署检查(标准更严格)
  2. 要求Git工作目录完全干净
  3. 要求所有测试用例通过
  4. 生成完整的发布说明
  5. 创建Git版本标签
  6. 提供生产环境的部署命令

Pre-flight Check Output

预部署检查输出示例

markdown
undefined
markdown
undefined

Deployment Readiness Check

Deployment Readiness Check

Git Status

Git Status

✅ Working directory clean ✅ On branch: main ✅ Up to date with origin/main
✅ Working directory clean ✅ On branch: main ✅ Up to date with origin/main

Build

Build

✅ Build successful ⏱️ Build time: 45s
✅ Build successful ⏱️ Build time: 45s

Tests

Tests

✅ All tests passing (142/142) 📊 Coverage: 78%
✅ All tests passing (142/142) 📊 Coverage: 78%

Environment

Environment

✅ All required variables set ⚠️ Optional: SENTRY_DSN not set
✅ All required variables set ⚠️ Optional: SENTRY_DSN not set

Dependencies

Dependencies

✅ No known vulnerabilities ⚠️ 3 packages have updates available
✅ No known vulnerabilities ⚠️ 3 packages have updates available

Verdict: ✅ Ready for deployment

Verdict: ✅ Ready for deployment

undefined
undefined

Release Notes Generation

发布说明生成

When deploying, generate release notes from:
  • Git commits since last tag/release
  • Merged PR titles and descriptions
  • Conventional commit messages
Format:
markdown
undefined
部署时,从以下来源生成发布说明:
  • 自上次标签/版本以来的Git提交记录
  • 已合并PR的标题和描述
  • 符合规范的提交信息
格式示例:
markdown
undefined

Release v1.2.3

Release v1.2.3

Features

Features

  • feat(auth): Add OAuth2 support (#45)
  • feat(api): New user endpoints (#48)
  • feat(auth): Add OAuth2 support (#45)
  • feat(api): New user endpoints (#48)

Bug Fixes

Bug Fixes

  • fix(ui): Correct button alignment (#46)
  • fix(ui): Correct button alignment (#46)

Other Changes

Other Changes

  • chore(deps): Update dependencies
  • docs: Update API documentation
undefined
  • chore(deps): Update dependencies
  • docs: Update API documentation
undefined

CI/CD Integration

CI/CD集成

Detect and provide commands for:
  • Vercel:
    vercel --prod
  • Netlify:
    netlify deploy --prod
  • Railway:
    railway up
  • Docker: Build and push commands
  • Kubernetes:
    kubectl apply
    commands
  • GitHub Actions: Trigger workflow
自动检测并提供对应平台的部署命令:
  • Vercel:
    vercel --prod
  • Netlify:
    netlify deploy --prod
  • Railway:
    railway up
  • Docker: 构建和推送命令
  • Kubernetes:
    kubectl apply
    命令
  • GitHub Actions: 触发工作流

Safety Features

安全特性

  • Never auto-deploy to production
  • Always show diff of what will be deployed
  • Require confirmation for destructive actions
  • Suggest rollback commands
  • Log deployment actions
  • 绝不会自动部署到生产环境
  • 始终展示即将部署内容的差异
  • 执行破坏性操作前需用户确认
  • 提供回滚命令建议
  • 记录所有部署操作

Examples

使用示例

User:
/ai-factory.deploy
Run all pre-flight checks, report readiness.
User:
/ai-factory.deploy staging
Prepare staging deployment with changelog.
User:
/ai-factory.deploy production
Full production deployment workflow with release notes.
用户:
/ai-factory.deploy
执行全部预部署检查,报告部署就绪状态。
用户:
/ai-factory.deploy staging
准备预发布环境部署并生成变更日志。
用户:
/ai-factory.deploy production
执行完整的生产环境部署工作流并生成发布说明。