Hugo forum users! I’d like to know how you follow Hugo news and how you update Hugo for your websites – locally but also on e.g. Netlify.
My current workflow: I’ve (recently ) started following Hugo on Twitter and release-watching the Hugo GitHub repo so I don’t miss releases. I read the changelog, and then update Hugo locally, and open PRs in the few websites I (help) maintain, updating Hugo version in the Netlify config.
My wish: This works well but I was hoping to make it a bit more automatic, potentially with GitHub Actions, where a workflow would open a PR changing the Hugo version in the Netlify config. Now, I’m not sure how to trigger such a workflow automatically at each new Hugo release (In the absence of such a trigger, I might resort to scheduled workflow runs to check for Hugo updates once a month or so.). Any hint?
And more generally, what is your process for following, and installing, Hugo updates?
Hey @maelle! I’m doing something similar to you – I get notifications that Hugo’s updated via the emails from this forum, and then manually updating next time I make changes.
Checking for updates on a scheduled basis sounds like it could work – the Github API exposes releases for a repo and I guess you could compare versions there. I guess if you set Netlify up to automatically build previews on PRs, that could be a really nice workflow – my biggest concern with automatically updating Hugo versions would be that sometimes assumptions changes in subtle ways (e.g. the switch to Goldmark a few versions ago). Automatic previews work around that.
Thanks! Yes the preview would be crucial, otherwise there might be things breaking without my noticing I’ll update this thread if I explore the GitHub Actions idea further.
I created a GitHub Actions workflow that looks for Hugo updates once a month.
The workflow modifies the lines
HUGO_VERSION = <version>
<version> is different from the latest Hugo release.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.