ai-factory.deploy
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDeployment Assistant
部署助手
Help prepare and execute deployments safely with automated checks and documentation.
借助自动化检查和文档工具,安全地准备并执行部署操作。
Behavior
行为逻辑
Without Arguments (Pre-flight Checks Only)
无参数调用(仅执行预部署检查)
Run deployment readiness checks:
-
Git Status Check
- Ensure working directory is clean
- Verify on correct branch
- Check if branch is up to date with remote
-
Build Check
- Run build command (,
npm run build, etc.)cargo build - Report any build errors
- Run build command (
-
Test Check
- Run test suite
- Report coverage if available
-
Environment Check
- Verify required environment variables
- Check vs actual env
.env.example
-
Dependency Check
- Look for security vulnerabilities (, etc.)
npm audit - Check for outdated critical packages
- Look for security vulnerabilities (
运行部署就绪性检查:
-
Git状态检查
- 确保工作目录干净
- 验证当前处于正确分支
- 检查分支是否与远程仓库保持同步
-
构建检查
- 执行构建命令(、
npm run build等)cargo build - 报告所有构建错误
- 执行构建命令(
-
测试检查
- 运行测试套件
- 若有可用数据则报告测试覆盖率
-
环境检查
- 验证所需环境变量是否已配置
- 对比与实际环境配置
.env.example
-
依赖项检查
- 排查安全漏洞(如等工具)
npm audit - 检查是否存在需要更新的关键依赖包
- 排查安全漏洞(如
With Environment Argument
带环境参数调用
/ai-factory.deploy staging
/ai-factory.deploy staging/ai-factory.deploy staging
/ai-factory.deploy staging- Run pre-flight checks
- Generate changelog since last staging deploy
- Provide deployment commands for staging environment
- Tag release as staging-{date}
- 执行预部署检查
- 生成自上次预发布环境部署以来的变更日志
- 提供预发布环境的部署命令
- 将版本标记为staging-{日期}
/ai-factory.deploy production
/ai-factory.deploy production/ai-factory.deploy production
/ai-factory.deploy production- Run ALL pre-flight checks (more strict)
- Require clean git status
- Require all tests passing
- Generate full release notes
- Create git tag for release
- Provide production deployment commands
- 执行全部预部署检查(标准更严格)
- 要求Git工作目录完全干净
- 要求所有测试用例通过
- 生成完整的发布说明
- 创建Git版本标签
- 提供生产环境的部署命令
Pre-flight Check Output
预部署检查输出示例
markdown
undefinedmarkdown
undefinedDeployment 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
undefinedundefinedRelease 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
undefinedRelease 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
undefinedCI/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: commands
kubectl apply - 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:
Run all pre-flight checks, report readiness.
/ai-factory.deployUser:
Prepare staging deployment with changelog.
/ai-factory.deploy stagingUser:
Full production deployment workflow with release notes.
/ai-factory.deploy production用户:
执行全部预部署检查,报告部署就绪状态。
/ai-factory.deploy用户:
准备预发布环境部署并生成变更日志。
/ai-factory.deploy staging用户:
执行完整的生产环境部署工作流并生成发布说明。
/ai-factory.deploy production