将当前分支部署到测试环境。当用户要求部署、发布到测试或在 staging 环境测试时使用
Installation
Details
Usage
After installing, this skill will be available to your AI coding assistant.
Verify installation:
npx agent-skills-cli listSkill Instructions
name: deploy-staging description: 将当前分支部署到测试环境。当用户要求部署、发布到测试或在 staging 环境测试时使用
部署到测试环境
前置条件检查
执行部署前,必须验证:
-
当前分支所有变更已提交
- 运行
git status检查 - 如有未提交内容,提示用户先提交
- 运行
-
所有测试通过
- 运行
npm test - 如测试失败,停止部署并报告失败原因
- 运行
-
代码已推送到远程仓库
- 运行
git push - 确保远程分支是最新状态
- 运行
部署流程
-
构建生产版本
npm run build:staging -
运行部署脚本
./scripts/deploy-staging.sh -
等待部署完成
- 显示部署进度
- 捕获并显示错误信息
-
验证部署
curl -f https://staging.example.com/health -
报告部署结果
- 成功:提供访问链接
- 失败:显示错误日志和回滚建议
错误处理
如果部署失败:
- 保存错误日志到
.logs/deploy-staging-{timestamp}.log - 建议用户检查日志
- 提供回滚命令:
./scripts/rollback-staging.sh
部署后检查
部署成功后,提醒用户验证:
- 关键功能是否正常
- 数据库迁移是否成功
- 静态资源是否加载正常
More by einverne
View all生成符合 Conventional Commits 规范的 Git 提交信息。当用户要求生成提交、创建 commit 或写提交信息时使用
Guide for using Repomix - a powerful tool that packs entire repositories into single, AI-friendly files. Use when packaging codebases for AI analysis, generating context for LLMs, creating codebase snapshots, analyzing third-party libraries, or preparing repositories for security audits.
Browser automation, debugging, and performance analysis using Puppeteer CLI scripts. Use for automating browsers, taking screenshots, analyzing performance, monitoring network traffic, web scraping, form automation, and JavaScript debugging.
生成符合项目规范的 React 组件。当用户要求创建组件、新建 React 组件或生成组件文件时使用
