Originally, I was going to deploy this site in a container on Kubernetes, but for now, I’ve deployed as a static website using Azure Blob Storage. This integrates with Azure CDN to deliver the site securely.
Thanks to GitHub Actions, on every push to main, the site is automatically updated by building a new version of the Hugo site, which is then deployed to Azure Blob Storage. The Azure CLI command az sync
keeps the files in Azure in sync with what’s been built on the GitHub Actions runner. This is done automatically as part of this GitHub Action, and ensures only the necessary files are on the Azure Blob Storage container.
Arguably a bit wasteful to rebuild an entire site every time you do something as simple as write a new blog post, but with Hugo, it’s rebuilt so quickly, that it’s not a big deal.
Azure Blob Storage can serve a static website (which, of course, Hugo is) as a built-in function. By using an Azure CDN endpoint, the site can use a custom domain (this one!) and be accessed securely over HTTPS.
I may still deploy a more dynamic site in a container on Kubernetes in the future as an educational project.