I want to share a solution for deploying my personal website (https://vanhala.org
), built with Zola, on Google Cloud with a custom domain.
I noticed that the Zola deployment documentation doesn’t have specific instructions for Google Cloud (GCP). However, I was able to model the AWS S3 and Github Pages/Actions instructions to create a fully automated deployment process.
I’ve created a GitHub template repository that uses Terraform to provision the necessary Google Cloud infrastructure, including Google Cloud Storage for static site hosting, Cloud DNS, and Cloud Load Balancing for serving the site with a custom domain and SSL certificate. A GitHub Actions workflow builds the Zola site and deploys it to the storage bucket.
After registering a custom domain and creating a Google Cloud account, you can create a new repository from the template and use the included Terraform files and GitHub Actions workflow to deploy your Zola site.
I’m sharing this for reference when others need a similar Google Cloud deployment. I considered creating a PR for a Google Cloud specific section in the Zola docs, but I’m uncertain which part of the solution to document. Writing up the Github Actions workflow feels redundant with other documentation, while documenting only the static hosting on Cloud Storage seems inadequate.