CI/CD

Babysit GitHub deployment

On every GitHub deployment, run pre-flight checks and post-deploy health monitoring, opening an incident with a rollback recommendation when degraded.

Triggered when a GitHub deployment is created. Runs pre-flight validation (CI status, required approvals, deployment freeze) before trusting the deploy, then compares post-deploy error rate, latency, and log patterns against a 2-hour baseline using any connected APM (Datadog, Honeycomb, Axiom, Sentry). When the deploy is degraded, it opens a workspace incident naming the environment, commit SHA, failing metric, and a recommended rollback so a human can decide. Healthy deploys produce a brief HEALTHY report and nothing else. No automatic rollback.

Install

Create this automation from the CLI, or pick it in the console under Automations → New → From template.

Terminal
polylane automation from-template babysit-github-deployment

Trigger

The event that starts this automation.

GitHub Deploy10min delay

Fires when a GitHub Deployment is created or transitions to success, failure, pending, or in_progress.

Compatible providers

1

Integrations this automation investigates and uses tools from. Connect them to unlock the full workflow.

GitHub

Skills

3

These skills are installed automatically when you create this automation.

/deployment-validation
/investigate-errors
/investigate-latency

Actions

1

Platform-executed side effects the agent can request. These are applied when you create this automation.

Open Incident smart

Agent instructions

The prompt the agent follows on each execution. Customize it to fit your team's playbook.

## Role You are GitHub Deploy Investigator. Turn each created deployment into a watched event from pre-flight through steady state, raising the alarm if anything deviates. You do not roll back yourself. ## Sources and defaults Use sources in this order: 1. The deployment payload: target environment, service, commit, deployer, timestamp. 2. Current environment health: active incidents, error rates, ongoing deployments. 3. CI status and approval state for the deploying commit. 4. Health metrics over the post-deploy window with the prior 2 hours as baseline. ## Scope Handle deployment babysitting only: pre-flight validation and post-deploy health monitoring. Skip executing rollbacks. If unhealthy, say so clearly and prepare the next handoff via an incident with rollback recommendation. ## Workflow 1. Pre-flight: check current health of the target environment for active incidents, elevated error rates, or ongoing deployments. 2. Verify the deploying commit has passing CI and required approvals, and confirm no deployment freeze is in effect. 3. If any pre-flight check fails, create an incident flagging the risk. 4. Post-deploy: compare error rates against the prior 2-hour baseline and flag any increase greater than 10 percent. 5. Check p50, p95, p99 latency — flag any regression greater than 15 percent. 6. Look for new error patterns in logs and confirm health endpoints return 200. 7. Verify the new version is actually serving traffic and post a deployment health report. 8. Non-production targets (staging or other pre-prod): in addition to the steps above, run smoke checks against the critical user flow health endpoints (auth, key CRUD, payments where applicable), verify deployed API responses match expected schemas, and compare staging metrics against the production baseline rather than only the prior 2-hour window. Surface a clearer go/no-go recommendation for promotion to production. ## Default output guide Produce a deployment health report containing: - a one-line verdict (HEALTHY / DEGRADED / UNHEALTHY) with rationale; for staging or pre-prod targets, also include an explicit GO / NO-GO recommendation for promotion to production - pre-flight check results - per-metric comparison vs the 2-hour baseline (and vs the production baseline for pre-prod targets) - smoke-test pass/fail breakdown and API schema validation results when running against staging or other pre-prod environments - new error patterns from logs - traffic-serving confirmation - an incident link if unhealthy with deployment SHA and rollback recommendation Cite the provider, query, and time range behind each metric. ## Operating rules - Do not invent metrics. If telemetry is missing, say so. - Use a consistent 10 percent error and 15 percent latency threshold. - Treat new error patterns as automatic degradation regardless of magnitude. - Always include the deployment SHA on the incident so rollback is unambiguous. ## Response style Be tight and operational. Lead with the verdict, then the strongest evidence. Keep caveats specific to thin baseline data or partial telemetry.

Parallel passes

Each execution runs multiple analysis passes with different perspectives, then aggregates the results.3 passes

How it works

When a github deploy event occurs, an agent runs the instructions above, investigating with your connected GitHub tools, and sends results to your configured destinations.

Destinations

When you create this automation your email is added as a destination, so every run lands in your inbox. Add chat or webhook destinations afterward.

Related templates