How This Blog Deploys
This blog runs on a Raspberry Pi at home, and publishing a post is now just a git push.
- The source lives in a GitHub repo. Pushing to
mainstarts a GitHub Actions job that builds the site with Hugo and publishes the output to adeploybranch. - On the Pi, a cron job runs every minute, fetches the
deploybranch and updates the files Caddy serves. - Cloudflare Tunnel connects the Pi to the internet, so there are no open ports at home.
The whole setup, from the Caddy config to the list of sites, is a git repo too, so rebuilding the Pi from scratch is a single script.