Migrating Hugo modules and Discourse data updates worflows - #969
Migrating Hugo modules and Discourse data updates worflows#969MuhammadAashirAslam wants to merge 4 commits into
Conversation
| if git diff --cached --quiet; then | ||
| echo "Discourse data is already up to date." | ||
| exit 0 | ||
| fi |
There was a problem hiding this comment.
In the current approach, the workflow is a bit more verbose than needed, because of the following fields:
"generated_at": "2026-08-12T07:18:28.922820","views": 2451,
Could we exclude these?
There was a problem hiding this comment.
Done 3bbea9f
I've set a view threshold, so a commit is now only made if the diff is greater than the threshold.
Some testing:
- A commit was made (47bd3af) because of the testing reduction (cb17c4c).
- After that, no commit was made even when we ran the workflow again: https://github.com/MuhammadAashirAslam/precice.github.io/actions/runs/32112340065
When a commit is made, all of the view counts are updated, meaning that if only one card reaches the threshold, all of them get updated (the threshold right now is 50), but I think it would be better to reduce it.
Also used USER_AGENT because of rate limiting.
There was a problem hiding this comment.
Note that other repositories trigger the update-submodules.yml. Maybe keep the same name?
https://github.com/precice/tutorials/blob/develop/.github/workflows/update-website.yml
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
Suppressed comments (1)
.github/workflows/update-hugo-modules.yml:1
- The retired workflow is still the documented update path:
content/docs/docs-meta/overview.md:136-151tells contributors to manage submodules and links directly toupdate-submodules.yml, whileREADME.md:22-28also instructs them to update submodules. Once this workflow is deleted, that link is dead and following the documented process will not update the Hugo modules. Please migrate these instructions tomodule.toml/go.modand the new workflow as part of this change.
name: Update Hugo modules
Replaces the obsolete submodule updater with automated Hugo Module synchronization using go.mod and go.sum. Updates the Discourse news and FAQ data workflows for Hugo’s static/assets paths, and removes the retired submodule workflow.