Last updated: 12 November 2026. See the update log at the end.
The simplest GitHub Actions deploy is "SSH in, git pull , run a few commands". It works until a migration fails halfway, or a request arrives while files are half-updated, or you need to go back to yesterday's code. This final part of the series uses a releases directory instead: each deploy builds a new directory, runs migrations, warms the caches, and only then switches a current symlink. If anything before the switch fails, the live site is untouched. It builds on Part 1 (tests) and Part 2 (caching) .
I ran the deploy job's shell steps and the server script locally, against a real MySQL server, with a stand-in for ssh .…