Set up automatic revert for a failed deploy

Auto-revert watches the deploy your merge starts. If it fails, it opens and merges a revert pull request and tells you why. It is free for your first 10 releases, then part of Pro.

Step 1: say which workflows deploy

Open Settings, Repositories, Edit. Under Deploy to watch, tick the workflows that deploy to production, for example deploy.yml. If none is ticked, every run the merge starts is watched, so an unrelated workflow that fails (a lint or nightly job) would count as a failed deploy and could revert a good release. Always tick the deploy workflow.

Step 2: check the timeouts

The recommended values are filled in. You can change them (minutes):

Step 3: mark deploys that happen by hand

If some paths are deployed manually (for example a database migration), list them under Paths that deploy by hand. A pull request that touches them gets a warning, because an automatic revert cannot undo them.

What happens on a failure

Requirement

The deploy must run from a workflow that starts on push. A deploy started by hand or by another system cannot be followed.

Background reading: How to automatically revert a failed deploy (and when not to) · Why your auto-rollback job can't push the revert to main · Why a merged pull request didn't start your deploy workflow

More guides: Add a health check URL to catch bad releases that deploy green · Schedule your first merge