I’ve been dusting of this blog post in the last couple of weeks, and I thought it might be interesting to write about how I automatically deploy this website.
To achieve this, I’m using Github Actions as a CI/CD solution!
It essence, the actions works like this:
Github Actions watches my repo for new commit on the master branch On commit, it spins up a worker running Ubuntu, which will clone this reposity After the clone is done, the worker will update my theme of choice using a submodule When this cloning is all done, Github Actions will setup Hugo in the build environment for me Finally, it will build my site! When the site is build, it is deployed to my VPS at DigitalOcean for you all to read The setup uses some secrets. This is configured on the repository. I’m using a seperate user, which is only allowed to login over ssh with a public key, to deploy the website.
...