CI/CD for Hugo with GitHub Actions

I’ve been moving this site to hugo quite a while ago, but only recently stumbled across the idea to create a workflow on GitHub Actions to build a hugo site straight after each push. Contrary to many other articles however, I didn’t have the option to publish the page to GitHub Pages or similar, simply because the project still is under heavy construction. So, I had the following requirements: Start workflow after each push, but also enable manual triggering for testing purposes Build the site, considering it requires additional dependencies due to relying on Googles Docsy-Theme Bonus: Use a tool to verify the integrity of all the internal links and images to verify correct paths Let’s keep it simple: I started with a regular setup of the repo on an up-to-date Ubuntu container: ...

January 20, 2023 · 5 min · Marcel Jurtz