This repository was archived by the owner on May 29, 2026. It is now read-only.
feat(build): refresh app-downloads at build time, drop bot-push workflow#26
Merged
Merged
Conversation
The old .github/workflows/app-downloads.yml ran nightly and tried to git push the regenerated data/app-downloads.json to development. The org-wide PR-required ruleset blocked the bot push, so the data went stale and the homepage showed '0 downloads'. Move the refresh to a Docusaurus prebuild step so the JSON is regenerated on every site build. No bot push, no rule fight. Add a nightly cron + workflow_dispatch trigger to documentation.yml so the site rebuilds daily even without code changes, refreshing the data each time. Centralized workflow already (PR ConductionNL/.github#46) passes GITHUB_TOKEN to the build step so the script can authenticate against the GitHub API and avoid the 60 req/hr unauth ceiling on the 331-repo enumeration. The committed JSON snapshot stays for local-dev convenience but is overwritten on every CI build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pairs with ConductionNL/.github#46 (already merged) which passes
GITHUB_TOKENto the centralized build step and letsschedule/workflow_dispatchevents deploy.Why
The old
.github/workflows/app-downloads.ymlran nightly and tried togit pushthe regenerateddata/app-downloads.jsontodevelopment. The org-wide PR-required ruleset blocked the bot push (github-actions[bot]can't be added to a ruleset bypass list — only installed Apps appear in the picker), so the data went stale and the homepage showed '0 downloads'.How
prebuildnpm script runs the existing Python fetcher (.github/scripts/app_downloads.py) beforedocusaurus build. JSON is regenerated on every site build, no bot push needed.documentation.ymlso the site rebuilds nightly at 07:00 UTC even without code changes, picking up fresh download counts each cycle.app-downloads.yml— the bot-push workflow is no longer needed.Failure mode
If the GitHub API or Nextcloud store is unreachable when the cron fires, the prebuild step fails and the deploy is skipped. The previously-deployed site stays live until the next cron tick (24h max). Acceptable for download counts; preferable to silently shipping stale data.
Verification after merge
Documentationrun on conduction-website (or trigger viagh workflow run documentation.yml -R ConductionNL/conduction-website).