How One Change Reaches Production
Follow a single edit through every gate: branch, local tests, pull request, CI, merge, build, deploy, and the checks that run after it is live.
The example change
Say I fix a typo in a travel guide. It is the smallest possible change, and it still goes through every step below. That is the point: one path for every change, so the path is well worn and nothing is special.
Step 1: a branch
git switch -c improve/typo-in-hampi
Work never happens on main. The main branch is what production runs, so it only changes through a reviewed merge. Branch names say what kind of work it is (improve/, feature/, fix/) and what it touches.
Step 2: the edit and the local tests
The edit is to a Markdown file. Then:
npm test
More than 650 tests run in about eight seconds on a laptop. Some check code; many check content: that every page has a title, that links point at pages that exist, that a guide has the sections it should. A typo fix can still break a page if a quote mark lands in the front matter, and a test will say so.
Step 3: commit and pull request
git add content/travel/india/destinations/city-hampi.md
git commit -m "content: fix a typo in the Hampi guide"
git push -u origin improve/typo-in-hampi
Files are staged by name, never with git add -A, so nothing unexpected rides along. Then a pull request is opened on GitHub.
Step 4: CI runs the tests again
GitHub Actions starts a clean Linux machine, installs exactly the dependencies in the lock file, and runs the same tests. This catches the classic "works on my machine" problem: a file that exists locally but was never committed, or a difference between Windows and Linux. A green tick on the pull request is the condition for merging.
Step 5: merge
The pull request is merged into main. This is the moment of release. Everything after this is automatic.
Step 6: Cloud Build
A trigger sees the push to main and starts Cloud Build, which:
- runs the tests once more, in the same Node version the server uses. If they fail, nothing is deployed;
- builds a Docker image from the Dockerfile;
- pushes the image to Artifact Registry, tagged with the short commit ID;
- tells Cloud Run to deploy that exact image, and records the commit ID as an environment variable.
Step 7: Cloud Run swaps versions
Cloud Run starts the new container, waits for it to answer, then moves traffic to it. The old version stays on record as a revision, ready to take traffic back with one command.
Step 8: checks after it is live
- The site exposes the commit ID it is running. A job compares it with the commit that was merged, so "is my change live?" has a yes-or-no answer.
- The Lighthouse job waits for that commit to be live, then measures the speed of key pages and saves the result. A deploy shows up as a marker on the speed chart.
- The scheduled health check keeps opening pages and records any that fail or are slow.
Where it can stop
| Gate | What stops the change | What you see |
|---|---|---|
| Local tests | A failing test | Red output on your screen |
| CI | A failing test on clean Linux | A red cross on the pull request |
| Merge | No green tick | The merge waits |
| Cloud Build | Tests fail again, or the image will not build | A failed build; production untouched |
| After deploy | Pages fail or slow down | Health and speed checks in Ravi OS |
Every gate before the merge is cheap: it costs minutes. Every gate after the merge is more expensive, because by then real visitors might see the problem. Good DevOps pushes checks as early as possible.
The whole path in one line
branch → test locally → pull request → CI → merge → Cloud Build (test, build, push, deploy) → Cloud Run revision → confirm the live commit → speed and health checks.
Each arrow is a chapter somewhere in this series. The next series starts at the very first arrow: source control.
Try it yourself
Write down the path of one change in your own system, gate by gate, from the editor to production, the way the table above does. Mark each gate automatic or by hand. Every step marked by hand is a step that will one day be skipped, so it is the first candidate for automation.