About This Blog
This blog is the second iteration of my blog. The first one was a WordPress site hosted on GoDaddy using a version of PHP that was many versions too old, a super heavy theme, and an extremely complex block based layout generator.
This blog is served by Cloudflare Pages, using their built-in Hugo integration. In particular, I use their integration with github, where they subscribe to the
main branch of a dedicated blog repository. So, when I push to
main, Cloudflare will react by pulling down my changes and re-building and re-deploying the site. In practice, this takes less than a minute, sometimes less than 30 seconds.
But how does my code get to Github? Here’s where it gets weird.
This site is actually a follower of a site in my home network - blog.leo (Yes, I know that using a non-existent TLD for local DNS is potentially unsafe, I’ll be posting a discussion of that one later).
That site runs as a
docker compose stack containing the generated static site files and a nginx web server.
The code for blog.leo is stored in a self-hosted Gitea instance and deployed to a NUC in my home network using self-hosted Drone CI.
Gitea mirrors the code to GitHub using a push mirror authenticated with a GitHub Personal Access Token.
Ergo - when I push to main in Gitea, Drone CI deploys my blog locally, Gitea force-pushes to Github, and Cloudflare deploys my site to the public internet.
It’s fun watching them race, sometimes.