Hugo site automation with Cloud Build
In this post I collate the blog posts on building static sites with Hugo and Cloud Build for easier reference. At the beginning of the process, I wanted to experiment with using Hugo. As time progressed I found it to be an awesome piece of software. In addition I also wanted to utilise Cloud Build to automate the very manual process of blog deployment.
- Create a (multi-region) Cloud Storage Bucket
- Add permissions for website to the bucket
- Create a static site using Hugo.
- Add the static site to source version control e.g. GitHub
- Reference: Blogging with Hugo.
- Create a Hugo image
- Link Cloud Build to the static site under source version control
- Create a
cloudbuild.yamlconfiguration for Cloud Build
- Add the yaml configuration to the source control
- Create a Cloud Build trigger to reference the cloudbuild.yaml
- Add Blog entries to source version control
- Site will automatically deploy based on the Cloud Build trigger configuration
It may be helpful to read the prior blog posts on Hugo, Containers and automation on Google Cloud: