Skip to content

Generate Leaderboard #32

Generate Leaderboard

Generate Leaderboard #32

Workflow file for this run

name: Generate Leaderboard
on:
schedule:
- cron: "0 */6 * * *" # every 6 hours
workflow_dispatch:
permissions:
contents: write
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm install
- name: Generate leaderboard JSON
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx tsx scripts/generateLeaderboard.ts
- name: Commit updated leaderboard
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
git add public/leaderboard/*.json
git commit -m "chore: update leaderboard data" || echo "No changes"
git push