Today I created a Wercker step for building a Hugo site.
The details can be found on the article I wrote about it, but in summary it comes down to the ability to easily automate the deployments of your Hugo site using Wercker.
You might not be familiar with Wercker or why you would want to use this. In essence it’s a tool that will check your GitHub or Bitbucket repository for changes, and then run actions (steps in Wercker terms) against that code. This is further separated into two types of steps, build and deploy steps.
What I have done is create a build step for generating the static site. The end result of this is that I only need to push up a new post to my GitHub account and the deployment will then happen automatically. This means I am not limited to my computer for updating my site and that a lot of manual work is taken away from me.
Let me just provide an example of the configuration needed for this to show it’s not scary at all. This configuration is used by one of my sites for deploying to GitHub Pages, and I never needed to do create the git workflow mentioned in the official Hugo GitHub pages tutorial.
box: wercker/default build: steps: - arjen/hugo-build: version: 0.12 deploy: steps: - firstname.lastname@example.org: token: $GIT_TOKEN domain: www.arjen.eu basedir: public
I’m posting this here in the hope that it will make life easier for someone other than me, but let me know if you have any questions.