I’m using Github Actions to build and publish this site. In this setup I’m using two repositories, One for the source and another for the built site. On a push to the source repository an action runs which:
- Installs Hugo on the GitHub runner
- Checks out the source repository
- Checks out the built site repository
- Runs Hugo to build the site, redirecting output to the built site directory
- Creates a commit in the built site repository and pushes it
In the built site repository, on a push, another action calls a webhook. This is a script (defined within the built site repository) which simply does a git pull. This avoids having to do push the site from actions via SCP or some other mechanism.
graph LR;
A[Computer] -- git push --> B[Source Repo];
B -- Action --> C[Site Repo];
C -- Webhook --> D[Website];
C -- git pull --> D;
linkStyle default stroke: red
TODO: Fix styling of mermaid.js diagrams - particularly arrowhead colours in the dark theme version of the site.