GuidesDevOps

CI/CD: deploy on every push, without stress

By the Banzai Labs teamUpdated on 2 min read

PushTestsBuildDeployA test fails: nothing shipsAutomatic, on every push
On every push, tests, build, then release. A failing test stops everything.

The pipeline

  1. 1PushCode lands on the main branch.
  2. 2TestsAutomatic checks: types, tests, links.
  3. 3BuildThe site or app is built.
  4. 4DeployReleased, then checked.

What it changes

Before, after
Without CI/CD
  • Rare, heavy releases
  • Steps done by hand
  • Bugs found in production
With CI/CD
  • Small, frequent releases
  • Always the same steps
  • Bugs stopped before production

Good practices

  • A working branch, then a merge: only the main branch deploys.
  • Secrets (keys, passwords) in the service’s vault, never in the code.
  • A rollback ready before you need it.

Further reading: Hosting on a VPS, staging and Docker.

Frequently asked questions

CI and CD, what is the difference?
CI (continuous integration) tests and builds every change. CD (continuous deployment) automatically releases what passed CI.
Which tools?
GitHub Actions, GitLab CI or an equivalent. For a small project, your repository host’s service is enough.
What if a release breaks something?
Roll back to the previous version in one command. Small releases make the cause easy to find.

Read next

All guides