Hugo module theme + many Hugo sites - automatic deployment on all sites when theme changes

I have 1 Hugo theme module that I would like to use with many different Hugo sites.

In the ideal world then changes to a Hugo site would automatically deploy changes for that site, whereas changes to the Hugo theme module would automatically deploy the latest theme to all the site (5 at the moment, but hope to scale to over 100 eventually)…

Does anyone have any idea how to solve this in a good way? The only thing I can think of is overly complicated (detect changes to the theme repo (github api maybe) and then make an api call for each site to redeploy), would be nice if it could be achieved with a GitHub Action or some setting in Cloudflare/Netlify… would love to hear your ideas and how you solve it if you have a similar setup :slight_smile:

You could probably set up a GitHub action that triggers a Netlify build hook for each one of your sites on every commit to the module’s main branch. To make this work, you would always need to update the module before building the site, i.e. add hugo mod get -u github.com/path/to/module to the Netlify build command (script).