Fer Toffolo

How This Blog Deploys

This blog runs on a Raspberry Pi at home, and publishing a post is now just a git push.

  1. The source lives in a GitHub repo. Pushing to main starts a GitHub Actions job that builds the site with Hugo and publishes the output to a deploy branch.
  2. On the Pi, a cron job runs every minute, fetches the deploy branch and updates the files Caddy serves.
  3. 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.

#Homelab #Raspberry-Pi