An automated build and deploy pipeline
Pipeline stages
Style and type checks, unit tests, build, integration tests on the built image, dependency scan, and then deploy to a test environment. Deploy to production — automatic or one click, by your maturity.
Rules that hold
The pipeline must be fast. Over ten minutes, people start bypassing it. Split into a fast stage that always runs and a heavy stage that runs at night.
The same image that was tested is the one deployed. Rebuilding for production negates the value of the tests.
A pipeline failure stops everything. If you've grown used to red tests, you don't have a pipeline but a decoration.
Secrets and publishing
Secrets come from a managed store, not config files. And every build gets a version number that also appears in the app — to know in a second what's running.
Going deeper
Add an automated quality gate: test coverage that doesn't drop, a bundle size that doesn't grow beyond budget, and severe vulnerabilities that block a merge. An automated gate prevents personal arguments — the rule is the same for everyone and doesn't depend on who's reviewing.