How to Set Up Zero-Downtime VPS Deployments Using GitHub Actions for Free
A developer has shared a self-hosted deployment workflow for PHP/Laravel apps that replicates paid tools like Laravel Forge without the added cost. The method uses a 'releases' folder pattern on a VPS, where each deployment is placed in a timestamped directory and a symlink is atomically flipped to point Nginx at the new release. Shared files such as environment configs and storage folders persist across releases, while failed deployments never affect live traffic since the symlink is only updated after all build steps succeed. The entire setup relies on GitHub Actions, SSH, and standard Linux commands, keeping infrastructure costs as low as $6 per month on providers like Hetzner or DigitalOcean. Rollback to a previous release requires just a single command to reassign the symlink and reload PHP-FPM.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in