A small team does not need a delivery platform. It needs one pipeline that answers three questions on every change: is it safe, does it run, and how do we undo it. Add anything else when a real pain appears. Most of it never does.
The shape
Keep one pipeline file in the repository, boring and readable. It has three stages, and each stage has one job:
- Check — lint, typecheck, and unit tests on every pull request. Fast enough to finish before the reviewer reads the diff.
- Build — produce one immutable artifact, such as a container image, tagged with the commit SHA. Build it once and promote it everywhere.
- Deploy — a merge to
maindeploys to staging. Production deploys the same artifact, on a tag or a manual approval.
The artifact boundary is the property that matters. What you tested is exactly what you deploy. Rebuilding "the same commit" in a second job is where drift starts.
Two environments, not five
Staging and production cover what a small team needs. Staging catches what tests cannot: migrations against a real database, config that only matters at runtime, and third-party integrations. Production is the only place with real users, so it is the only place with ceremony.
If staging keeps passing changes that production rejects, improve staging. Do not add a third environment. It is one more thing to keep current, and one more place for config to rot.
Make rollback the default path
Before the first real deploy, test the rollback. Redeploy the previous artifact and watch the service recover. The rollback should be the deploy command with an older tag:
./deploy.sh production 3f9c2e1 # the previous good SHA
If rollback needs a procedure someone half-remembers, it will fail at the worst moment. When it is one command, the team trusts it, and a team that trusts rollback ships smaller changes more often.
Keep secrets out of the pipeline file
Use your CI provider's secret store, and prefer short-lived credentials over stored keys. On AWS, OIDC federation lets the pipeline assume a role per run, so there is no access key to leak or rotate.
What to add later
Preview environments, canary releases, and extra approval gates each solve a pain you may not have yet. Add them one at a time, when the pain arrives, into the pipeline you already understand.
If you want help getting this shape running in your own repository, book a short call with us.