Doing module CI without embedding demo site in module

Having a demo/test site embedded in a Hugo module can cause large bandwidth consumption during its normal use as a module (due to pulling the demo site as part of each site build). So, I have split the site and module into separate git repos but keep a Netlify deploy as part of the CI process.

I have posted this to the Netlify support forums:

The actual article is here:

and the table of contents (which I hope is nice guide for those who don’t need to read the blow-by-blow).

  1. Preface
    1. Prerequisites
  2. Moving the large files out of the module
    1. Make a copy of the test site, elsewhere
    2. Make a list of any LFS files you wish to remove
    3. Remove references to unwanted files from CI
    4. Remove unwanted files and references to them
    5. Obliterate the large files
      1. Use git-filter-repo or similar tool
      2. For LFS, have the remote admin remove the LFS files
  3. Create a new Hugo module repo with the site
    1. Make sure the main module repository still works
  4. Use a subdirectory of the module as a ‘site’
    1. Add a site config in a subdirectory of the module
    2. Initialize exampleSite as a Hugo module
    3. Activate any modules from the config.toml
    4. Test with the Hugo local server
  5. Create a build script for use with Netlify
  6. Deploy on Netlify
  7. Set your GitHub branch protection rules to require successful deploy
  8. Remember to git rebase not git merge or git pull any existing branches
  9. Conclusion

@Tom_Durand @vassap This write up took longer than expected, so apologies for my delay in getting back to you.