Should every merge to main deploy to production automatically?
IntermediateProductionPipeline Design and Architecture
Answer
For stateless services with good test coverage, observability and automated rollback, yes, and it is the safest way to deploy because changes are small. Preconditions we require first: feature flags for incomplete work, backward-compatible migrations, a canary or progressive rollout, SLO-based automated rollback, and an on-call team that owns the service.
For regulated systems, shared databases or services lacking tests, we keep a manual approval but still automate everything else, so the human decision is a button click, not a runbook.
More on Pipeline Design and Architecture
What does a good production CI/CD pipeline look like end to end?BeginnerWhat is your target feedback time for CI and how do you hit it?IntermediateHow do you structure repositories: app repo, config repo, pipeline library?IntermediateHow do you design a pipeline for a monorepo with 50 services?AdvancedHow do you keep pipeline definitions DRY across hundreds of repos?IntermediateHow do you make a pipeline idempotent and safe to re-run?Intermediate