Files
loldle/data/.github/workflows/update-champions.yml
T
tiennm99 c446f08c2f feat(docs): regenerate CHAMPIONS.md from champions.json in scraper
- Add saveMarkdown in markdown.go rendering the Loldle classic-mode column
  table (Champion | Gender | Genre | Range | Resource | Region | Lane | Year).
- main.go writes CHAMPIONS.md after champions.json on every scrape.
- update-champions.yml stages CHAMPIONS.md alongside champions.json so CI
  commits both in lockstep.
- alt text on tile images now uses champion display name (e.g. Bel'Veth)
  instead of the ID slug.
2026-04-21 10:03:07 +07:00

42 lines
1.1 KiB
YAML

name: Update champions data
on:
schedule:
# Every Thursday at 06:00 UTC (day after Riot's Wednesday patch)
- cron: "0 6 * * 4"
workflow_dispatch:
permissions:
contents: write
jobs:
update:
runs-on: ubuntu-latest
steps:
# LOLDLE_PAT so the subsequent push triggers sync-champions.yml;
# default GITHUB_TOKEN would silently skip downstream triggers.
- name: Checkout
uses: actions/checkout@v5
with:
token: ${{ secrets.LOLDLE_PAT }}
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Run scraper
run: go run .
- name: Commit and push if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add champions.json CHAMPIONS.md
if git diff --cached --quiet; then
echo "No changes to commit"
exit 0
fi
git commit -m "chore: update champions data to latest patch"
git push