From git push to production: the complete path, step by step
Published on 2026-09-12 by frfrand
What happens exactly between when you push a commit and your site updates, the three points where it breaks, and how to read the logs to know which one it was.

Short answer: between git push and the updated site, four things happen: the commit reaches GitHub, GitHub notifies your server with a signed webhook, the server downloads the code and builds it, and the service restarts. If nothing was triggered, check the webhook; if it failed, check the build log; if it finished successfully but nothing changed, check the restart or the cache.
You run git push, wait thirty seconds, and your site is updated. What happens in between are four very concrete steps, and knowing them turns "the deploy didn't work" into a two-minute diagnosis.
Step 1: the commit reaches the repository
Your push sends the new objects to the remote. Up to this point, nothing has to do with your server.
If the push failed, the problem is with Git or permissions, and a deployment hasn't even started.
Step 2: GitHub knocks on the door
Here is the detail that confuses beginners the most: your server does not check GitHub every so often. That would be a waste and would arrive too late.
It's the other way around: GitHub sends an HTTP request to an address of yours. That is a webhook.
Your server receives that message, verifies that it comes signed with the shared secret (otherwise anyone could trigger deployments), and only then starts working.
How to diagnose this step: GitHub keeps a history of each webhook with its response. If the deployment didn't start, that history says it all. A 404 means the address is wrong. A 500 means your receiver failed. A timeout means the server didn't respond.
This is the first place to look, and the one that most often solves the problem.
Step 3: the server builds
The server downloads the code and runs the project's build commands:
git pull npm install && npm run build # or pip install -r requirements.txt python manage.py migrate # if there are migrations
It is the longest step and the one that fails most often, almost always for two reasons:
- A new dependency that is on your machine and was not installed on the server.
- Memory. Compiling a modern frontend consumes quite a bit of RAM, and on a small VPS the process can die halfway through. The symptom is a log that cuts off abruptly, without a clear error. If you see that, check if the system killed the process due to lack of memory.
A decision worth considering: building on the server is simple and does not require extra infrastructure, but it consumes resources from the same server that serves users. Building outside and uploading the already compiled result is lighter in production, at the cost of more pieces.
Step 4: the service restarts
The new code is on disk, but the running process is still the old one, with the previous code loaded in memory. It needs to be restarted:
systemctl restart miapp
And here appears the gap: between the old process dying and the new one responding, two to ten seconds pass where no one is attending. The user sees a 502.
To avoid it, you have to reverse the order: bring up the new version, wait for it to respond, send traffic to it, and only then shut down the old one. For this, it's useful to have a health route that says "I'm really ready now."
If your site is static, this step doesn't even exist: the new files are already on disk and nginx serves them.
The summary worth having at hand
- Nothing was triggered → the webhook. Check the delivery history in GitHub.
- It was triggered and failed → the build log. Dependencies or memory.
- It finished fine but the site is still the same → the service wasn't restarted, or there's a cache in front.
- 502 right after publishing → it's the restart gap. If it persists, the app didn't come up: check its log.
In ArduMaker these four steps are configured once from the panel (repository, branch, commands, domain) and each deployment is kept in the history with each phase, its time, and the output of its commands (with secrets masked), so the question "at which of the four did it break?" is answered by looking, not guessing. Two more details: when a push doesn't deploy, the webhook response says why (automatic deployment disabled, another deployment in progress, or repeated delivery), and you see it in the GitHub delivery history; and several consecutive pushes are grouped, with at most one deployment running and one in queue.
From repository to first real request
On an ArduMaker VPS, the typical flow includes linking GitHub, preparing dependencies, configuring environment variables, starting the application as a service, associating the domain, and testing the HTTPS response. If there is PostgreSQL, you also need to run migrations and protect credentials.
The final check is not the "successful build" message: it is a real request to a health route and a verification that data persists after restart. Record the published commit and the result of each stage.
Related: What is CI/CD · How to find a failure on a server.
Frequently asked questions
Why didn't my push trigger the deploy? Check the webhook delivery history in GitHub: a 404 is a misconfigured address, a 500 is a receiver failure, and a timeout is a server that didn't respond. If the response was correct, it usually says why it was skipped.
Why does the build stop without error? Often it's due to lack of memory: the system kills the compilation process. Check if there was an OOM killer event or build outside and upload the result.
Why does a 502 appear right after publishing? It's the gap between the old process shutting down and the new one responding. If it lasts more than a few seconds, the application didn't start: check its log.