Daily stats updates + fix golf/league staleness#10
Draft
doyled-it wants to merge 4 commits into
Draft
Conversation
Change the update-stats workflow cron from Sundays only ('0 6 * * 0')
to every day at 6am UTC ('0 6 * * *').
Picks up two newly-played spring2026 games (Jun 7 vs Bubblegum Boys, Jun 14 vs San Diego Banditos); record now 6-6.
Golf and the league schedule can't run on GitHub-hosted runners (GHIN and sdabl1.info both 403 datacenter IPs), so split the automation by where it can actually run: - update-stats.yml (GitHub-hosted, daily): baseball only. Drop the broken golf step that copied the stale golf-stats repo into golf.json — a file nothing read (the site reads golf-raw.json). Remove the dead golf.json. - update-stats-local.yml (self-hosted, daily): golf + league, for a residential-IP runner. Needs GHIN_USERNAME/GHIN_PASSWORD secrets. Golf now reads straight from GHIN via fetch-golf.mjs: fix the ignored 'count' param (the schema field is 'limit') and pull the full handicap record alongside scores. League refresh no longer depends on the Obsidian vault: update-league.mjs reads scripts/sdabl-sources.json and scrapes into a configurable snapshot dir (SDABL_SNAPSHOT_DIR). 'npm run update:stats' now also runs the league refresh. Document the split and per-season node_id upkeep in the README.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
doyled-it | fc153ab | Commit Preview URL Branch Preview URL |
Jun 15 2026, 06:27 AM |
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.
Why
Two asks: (1) run the baseball/golf data update daily (was weekly) and run it now, and (2) investigate why the schedule/results/leaderboard on the all-time & season pages weren't updating correctly.
What I found
baseball.json) update fine via CI — the view/standings/playoff math is correct.league.json— drives the upcoming schedule, standings, playoff %, results) was never in CI. It only refreshed from a local Puppeteer scrape ofsdabl1.infotied to the Obsidian vault. It was frozen at May 5, which is exactly why San Diego Sox games on May 3/17/31 and Jun 7 still showed as "Scheduled" and the leaderboard was stale.golf-raw.json, but CI was writinggolf.json(a file nothing reads), and it copied from the now-stalegolf-statsrepo.sdabl1.info(league) both return 403 to datacenter IPs, so neither can run on GitHub-hosted runners.What this PR does
update-stats.yml): runs daily now (was Sundays); baseball-only. Dropped the broken golf step + deleted the deadgolf.json.fetch-golf.mjsnow reads straight from GHIN intogolf-raw.json, fixes the ignoredcount→limitparam, and pulls the full handicap record alongside scores.update-league.mjs(npm run update:league) scrapessdabl1.infousing a committedscripts/sdabl-sources.json(no Obsidian vault dependency) and a configurable snapshot dir. Fails safe — a blocked scrape leavesleague.jsonuntouched.update-stats-local.yml): a daily workflow for golf + league that runs on a self-hosted runner (residential IP), since those can't run on GitHub's runners.page_node_idupkeep.Also ran the baseball update manually — picked up two newly-played spring2026 games (Jun 7, Jun 14); record now 6-6.
Still requires you (can't be done from CI)
self-hosted.GHIN_USERNAME/GHIN_PASSWORD.page_node_idinscripts/sdabl-sources.json.npm run update:statslocally — I couldn't refresh them from here (403 + no creds).🤖 Generated with Claude Code
Generated by Claude Code