AgentSkillsCN

Deploy to Production

完备的部署流程,内置安全检查机制。

SKILL.md
--- frontmatter
name: Deploy to Production
description: Full deployment workflow with safety checks
trigger: manual

Deploy to Production

Pre-flight Checks

  1. Run npm test or pytest - all tests must pass
  2. Run npm run build or equivalent
  3. Check for uncommitted changes with git status
  4. Verify no secrets in staged files

Deployment Steps

  1. Create release branch: git checkout -b release/$(Get-Date -Format 'yyyyMMdd')
  2. Build production bundle
  3. Run security scan if available (npm audit / safety check)
  4. Deploy to staging first
  5. Run smoke tests against staging
  6. Deploy to production
  7. Tag release: git tag -a v$(Get-Date -Format 'yyyyMMdd.HHmm') -m "Production release"
  8. Push tags: git push --tags

Rollback Plan

If issues detected: git revert HEAD --no-edit && git push

Post-Deploy

  • Monitor error rates for 15 minutes
  • Verify health check endpoints
  • Update deployment log