ci: consolidate star fetch into deploy workflow with Actions cache#2972
Merged
ci: consolidate star fetch into deploy workflow with Actions cache#2972
Conversation
Reformats dict and list literals to trailing-comma multiline style throughout. Also copies README.md to llms.txt in the site output so LLM crawlers can discover the full content. Co-Authored-By: Claude <noreply@anthropic.com>
Switches install step from --no-dev to --group build for explicit dependency group selection, and replaces the bare python invocation with `make build` to use the canonical build entrypoint. Co-Authored-By: Claude <noreply@anthropic.com>
Rename the Makefile target from fetch_stats to fetch_github_stars to match the script name. Remove CACHE_MAX_AGE_DAYS and the staleness check so every run fetches all repos unconditionally. Co-Authored-By: Claude <noreply@anthropic.com>
Runs on a nightly schedule, installs deps with uv, calls make fetch_github_stars, and pushes an update commit only when the star data file actually changed. Co-Authored-By: Claude <noreply@anthropic.com>
Adds a workflow_run trigger so the site is rebuilt whenever fresh star data lands on master, in addition to the existing push trigger. The build job guard ensures it only runs on direct pushes or when the upstream workflow concluded successfully. Co-Authored-By: Claude <noreply@anthropic.com>
The generic email 'github-actions[bot]@users.noreply.github.com' does not match GitHub's actual bot account. Using the numeric-prefixed form '41898282+github-actions[bot]@users.noreply.github.com' ensures commits made by the workflow are correctly attributed to the bot account. Co-Authored-By: Claude <noreply@anthropic.com>
Replace the separate fetch-github-stars.yml workflow (which committed star data back to git) with an inline fetch step in deploy-website.yml. Star data is now stored in Actions cache between runs, eliminating the workflow_run trigger chain and the need to track github_stars.json in the repository. Co-Authored-By: Claude <noreply@anthropic.com>
Introduce CACHE_MAX_AGE_HOURS (12 h) and filter current_repos before the fetch loop so repos that were updated recently are not re-requested. Prints a breakdown of fetched vs cached count. Co-Authored-By: Claude <noreply@anthropic.com>
Removed the 'if: github.event_name == schedule' guard so the step also runs on manual dispatches and push-triggered deploys, not only on the nightly schedule. Co-Authored-By: Claude <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
actions/cacheto persistwebsite/data/github_stars.jsonbetween runsCACHE_MAX_AGE_HOURS = 12staleness check so fresh data isn't re-fetched unnecessarilypushandschedule) but the script skips repos cached within 12 hoursChanges
.github/workflows/deploy-website.yml— removedworkflow_run, addedschedulecron, cache restore/save/verify steps.github/workflows/fetch-github-stars.yml— deletedwebsite/fetch_github_stars.py— addedCACHE_MAX_AGE_HOURS = 12withtotal_seconds()/3600(avoids.daysrounding bug)website/data/github_stars.json— untracked + gitignoredTest plan
uv run pytest website/tests/ -v— all 96 tests pass🤖 Generated with Claude Code