deploy-watch

Monitor GitHub Actions deploy workflows after merging a PR to staging. Polls until all deploys complete, diagnoses failures, and reports results.

5 stars

Best use case

deploy-watch is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Monitor GitHub Actions deploy workflows after merging a PR to staging. Polls until all deploys complete, diagnoses failures, and reports results.

Teams using deploy-watch should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/deploy-watch/SKILL.md --create-dirs "https://raw.githubusercontent.com/ajcpwnz/tricycle-pro/main/modules/ci-watch/skills/deploy-watch/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/deploy-watch/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How deploy-watch Compares

Feature / Agentdeploy-watchStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Monitor GitHub Actions deploy workflows after merging a PR to staging. Polls until all deploys complete, diagnoses failures, and reports results.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

## Input

```text
$ARGUMENTS
```

## Step 1: Determine What to Watch

- If `$ARGUMENTS` contains a PR number (e.g., `72` or `#72`): find the merge commit via `gh pr view <number> --json mergeCommit -q .mergeCommit.oid`
- If blank: use the latest commit on staging: `git log origin/staging -1 --format=%H`

Record the **merge SHA** and **merge time** for filtering.

## Step 2: Identify Expected Deploy Workflows

The project has 4 deploy workflows triggered on push to `staging`:

| Workflow | Trigger Paths | File |
|----------|--------------|------|
| Deploy Backend | `apps/backend/**`, `bun.lock` | `deploy-backend-staging.yml` |
| Deploy Frontend | `apps/frontend/**`, `packages/web/**`, `bun.lock` | `deploy-frontend-staging.yml` |
| Deploy Manager | `apps/manager/**`, `packages/web/**`, `bun.lock` | `deploy-manager-staging.yml` |
| Deploy Dashboard | `apps/dashboard/**`, `packages/web/**`, `bun.lock` | `deploy-dashboard-staging.yml` |

Check which files were changed in the merge commit:
```bash
gh pr view <pr-number> --json files -q '.files[].path'
# or for latest push:
git diff --name-only HEAD~1
```

Determine which deploy workflows SHOULD trigger based on path filters. If `bun.lock` changed, all 4 deploy.

## Step 3: Initial Wait

Sleep **30 seconds** — deploy workflows take time to queue after a push.

## Step 4: Poll Loop

Poll up to **30 iterations**, **20 seconds apart** (max ~10 minutes):

```bash
gh run list --branch staging --limit 10 \
  --json databaseId,name,status,conclusion,createdAt,updatedAt
```

Filter to:
- Runs with `createdAt` after the merge time
- Runs matching `Deploy *` workflow names

Each iteration, print a one-line status:
```
Deploy: Backend ✓ | Frontend ⏳ | Manager ✓ | Dashboard — (not triggered)
```

Break when all expected workflows have completed (success or failure).

If **no deploy workflows appear** after 3 iterations (90 seconds):
- Check if the merge actually changed files matching deploy path filters
- If no matching files: report "No deploy workflows triggered — merge didn't touch deployable paths"
- If matching files exist but no workflows: warn about potential GitHub Actions issue

## Step 5: Report Results

### All Passed

```
Deploy Status: staging (merge SHA abc1234)
┌────────────────────┬───────────┬────────────┬──────────────────────┐
│ Workflow            │ Status    │ Duration   │ URL                  │
├────────────────────┼───────────┼────────────┼──────────────────────┤
│ Deploy Backend     │ ✓ passed  │ 3m 42s     │ <run-url>            │
│ Deploy Frontend    │ ✓ passed  │ 2m 15s     │ <run-url>            │
│ Deploy Manager     │ — skipped │ —          │ (no matching paths)  │
│ Deploy Dashboard   │ — skipped │ —          │ (no matching paths)  │
└────────────────────┴───────────┴────────────┴──────────────────────┘
All deploys succeeded.
```

### Any Failed

Print the table as above, then for each failed workflow:

1. Fetch logs: `gh run view <run-id> --log-failed`
2. Diagnose the failure type:
   - **Docker build failure**: Check for missing dependencies, Dockerfile syntax, build context issues
   - **SSH/connection timeout**: Server unreachable — check VPS status
   - **Health check failure**: App started but health endpoint not responding — check logs on server
   - **Migration error**: Prisma migration failed on staging DB — check migration compatibility
   - **Cert renewal failure**: certbot non-fatal — report but don't block
3. Suggest a specific fix
4. If the fix is obvious and code-level (not infrastructure), offer to fix and push

Related Skills

qa-run

5
from ajcpwnz/tricycle-pro

Run QA test suites against the local dev stack using Chrome DevTools and Playwright MCPs. Verifies environment, executes test flows, monitors for network errors, writes results, and creates Linear tickets for failures.

tdd

5
from ajcpwnz/tricycle-pro

Red-Green-Refactor test-driven development workflow. Guides the agent through writing failing tests first, then implementing code to pass them, then refactoring while keeping tests green.

linear-audit

5
from ajcpwnz/tricycle-pro

Route audit findings to Linear as issues. Reads the most recent audit report from docs/audits/, parses findings at warning severity or above, and creates Linear issues in the project's configured team. Requires Linear MCP server to be available.

document-writer

5
from ajcpwnz/tricycle-pro

Document generation skill for creating DOCX, PDF, PPTX, and other formatted documents. Guides structured content creation with proper formatting, headings, tables, and professional presentation.

debugging

5
from ajcpwnz/tricycle-pro

Structured debugging workflow: reproduce, isolate, trace, fix, verify. Use when investigating bugs, unexpected behavior, or test failures. Guides systematic root-cause analysis instead of trial-and-error.

code-reviewer

5
from ajcpwnz/tricycle-pro

PR review, quality audit, and security checks. Invoke when reviewing code changes before merging or pushing. Performs structured review covering correctness, security, performance, and maintainability.

catholic

5
from ajcpwnz/tricycle-pro

Apply reverent, faith-inspired Christian verbiage to non-code artifacts. Invoke when generating specs, plans, task lists, READMEs, or other documentation to infuse them with blessings, gratitude, and references to divine guidance. Never applies to source code or config files.

deployment

9
from jkomoros/community-patterns

Deploy and update patterns. Use when deploying new patterns, updating existing deployments, or testing syntax. Includes deployment commands and the first custom pattern celebration.

pytorch-deployment

9
from tondevrel/scientific-agent-skills

Advanced sub-skill for PyTorch focused on model productionization and deployment. Covers TorchScript (JIT/Tracing), ONNX export, LibTorch (C++ API), and inference optimization (Quantization, Pruning).

verify-deploy

9
from exiao/skills

Post-merge deploy verification. Waits for deploy, benchmarks production, monitors for regressions. Use after merging a PR to confirm the deploy is healthy.

trendr-watchdog

9
from gy-hou/trendr

运行时监督器。监控 run_status/progress/log 活跃度,发现卡住后自动向 owner session 注入断点续跑指令。

securing-helm-chart-deployments

9
from killvxk/cybersecurity-skills-zh

通过验证 Chart 完整性、扫描模板中的错误配置并在 Kubernetes 发布中强制执行安全上下文,保护 Helm Chart 部署安全。