AgentSkillsCN

deploy

生产环境部署工作流。运行测试、构建并部署应用。

SKILL.md
--- frontmatter
name: deploy
description: "Production deployment workflow. Testleri çalıştırır, build alır ve deploy eder."
argument-hint: "[environment: dev|staging|prod]"
disable-model-invocation: true
allowed-tools:
  - Bash
  - Read
  - Glob
hooks:
  PreToolUse:
    - matcher: "Bash"
      hooks:
        - type: command
          command: "echo 'Deploy command executing...'"

Deploy Workflow

$ARGUMENTS ortamına deployment yapar.

Deployment Adımları

  1. Pre-flight Checks

    bash
    # Git durumu temiz mi?
    git status --porcelain
    
    # Doğru branch'te miyiz?
    git branch --show-current
    
  2. Run Tests

    bash
    npm test
    
  3. Build

    bash
    npm run build
    
  4. Deploy

    • dev: Otomatik deploy
    • staging: Otomatik deploy + smoke test
    • prod: Manuel onay gerekli

Rollback

Hata durumunda:

bash
git revert HEAD
npm run deploy:rollback

Checklist

  • Testler geçti
  • Build başarılı
  • Environment variables kontrol edildi
  • Database migration'lar çalıştı
  • Health check OK