This post is one of several in the “Hugo Blogging” series. If you haven’t, read the introduction to get started.
Since we are already using GitHub, let’s use GitHub Actions for the automation. Once set up, GitHub Actions will automatically build and deploy the site any time a change is detected.
Go to your repository on GitHub. Click the “Actions” tab.
Click “New workflow” (top left).
Look for the option to “Skip this step and set up a workflow yourself”.
Name the workflow
Write the workflow here. You can use this example workflow as a template.
If you use the example, make sure the branch names are consistent with your repository. For example, I changed all instances of
Click “Start commit” (top right). Click “Commit new file”.
Go to your repository “Settings”.
Choose “Options” on the left. Find the “GitHub Pages” settings.
Set the branch to
Set the folder to
Simply push your work to the repository. In a few moments, the site will be deployed to the