mirror of
https://github.com/tiennm99/miti99bot.git
synced 2026-04-27 16:20:37 +00:00
e1f7cdf645
KV payload cleanup: - drop lastResultAt from stats (never read) - drop solved/giveup flags from game state (round is immediately replaced after finish, making the flags transient noise) - skip redundant saveGame on winning/giveup/out-of-guesses paths; startFreshGame overwrites anyway Code cleanup: - delete daily.js + daily.test.js (pickDaily/todayUtc were speculative "future use" — only pickRandom was wired in, inlined into handlers) - drop the dead switch default in compare.js - trim file preambles across the module Docs: rewrite README around current behavior with loldle.net as the sole data source; update scraper header to match the raw schema.
49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
name: scrape-loldle-data
|
|
|
|
# Rebuilds src/modules/loldle/champions.json every Monday 06:00 UTC by
|
|
# scraping loldle.net's JS bundle (sole source of truth for classic-mode
|
|
# fields). Opens a PR if the output changed. Manually triggerable from the
|
|
# Actions tab.
|
|
#
|
|
# Note: the bundled data ships with the Worker — the change only takes effect
|
|
# after `npm run deploy` is run on the updated main branch.
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 6 * * 1"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
scrape:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
cache: npm
|
|
|
|
- run: npm ci
|
|
|
|
- name: Scrape loldle.net
|
|
run: npm run scrape:loldle-data
|
|
|
|
- name: Open PR if data changed
|
|
uses: peter-evans/create-pull-request@v7
|
|
with:
|
|
branch: data/loldle-weekly-refresh
|
|
delete-branch: true
|
|
commit-message: "data: weekly loldle.net champion refresh"
|
|
title: "data: weekly loldle.net champion refresh"
|
|
body: |
|
|
Automated weekly refresh of `src/modules/loldle/champions.json`
|
|
from loldle.net's JS bundle.
|
|
|
|
Review the diff, merge, then run `npm run deploy` to ship.
|
|
add-paths: src/modules/loldle/champions.json
|