Automatic PRs for updating Hugo on Netlify

We’ve started using Netlify to deploy our static websites. It is just too easy. Probably the biggest reason why we like it is because of the automatic PR preview environments.

We’ve also been using Hugo for building our static sites. It’s a little bit ridiculous how many different static site generators are out there, but after all the ones we’ve tried, Hugo is the closest to how we want it to work.

The biggest reason this matters, is that you use the same version on your local machine as you expect Netlify to deploy with. They do change things between versions (obviously 😉), which can cause some unexpected behavior if you’re not using the same thing in development.

In our experience, the easiest way to manage this (especially if you’ve got multiple Hugo sites and/or developers) is to just stay up-to-date. So you use the latest version on your machine, and expect Netlify to do the same.

With dependencies.io, this can be pretty easy as it will tell you when there’s a new version available. Not only that, but in combination with Netlify, the pull request that dependencies.io opens will automatically be deployed to a preview site where you can make sure everything is working.