Branch strategy for GUI development
As users adopt the site, active GUI development should happen in a separate branch so that errors do not disturb production. Until this is set up, main is used with rapid rollback (see CI/CD pipeline).
Proposed setup
Branches
| Repo | Branch | Purpose |
|---|---|---|
hugo-theme-samt-bu | dev | GUI changes under development |
samt-bu-docs | dev | Points to theme dev, any config changes |
Preview URL
Cloudflare Pages automatically builds a preview deploy for all non-main branches:
dev.samt-bu-docs.pages.dev
This can be used to test the full edit flow (commit, build polling, pending indicator, OAuth) against real GitHub – without affecting production content on main.
Complication: commit branch in JS
The JS code in custom-footer.html commits to main as the target branch. On the dev branch, test commits should go to dev, not main. Solution: inject the commit branch as a Hugo parameter from hugo.toml or as a CI environment variable, so the correct branch is used automatically depending on which branch is building.
Workflow
- Make changes to
hugo-theme-samt-buon thedevbranch - Commit and push → CF Pages builds preview
- Test the full edit flow on the preview URL
- Merge
dev→mainin the theme when ready - Update submodule pointer in
samt-bu-docs/main
Priority
Low for now – the rollback strategy on main is sufficient for current usage patterns. Should be set up when GUI changes become more experimental or the user base grows.