Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions .github/workflows/leaderboard.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
name: Update Contributor Leaderboard
# name: Update Contributor Leaderboard

on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
# on:
# workflow_dispatch:
# schedule:
# - cron: "0 0 * * *"

jobs:
update-leaderboard:
runs-on: ubuntu-latest
# jobs:
# update-leaderboard:
# runs-on: ubuntu-latest

permissions:
contents: write
# permissions:
# contents: write

steps:
- name: Checkout repository
uses: actions/checkout@v5
# steps:
# - name: Checkout repository
# uses: actions/checkout@v5

- name: Set up Node.js
uses: actions/setup-node@v4
# - name: Set up Node.js
# uses: actions/setup-node@v4

- name: Install dependencies
run: npm install
# - name: Install dependencies
# run: npm install

- name: Run leaderboard script
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: npm run generate
# - name: Run leaderboard script
# env:
# GH_TOKEN: ${{ secrets.GH_TOKEN }}
# run: npm run generate

- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# - name: Configure git
# run: |
# git config user.name "github-actions[bot]"
# git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Commit and push changes
run: |
git add src/data/leaderboard.json
git commit -m "Update leaderboard.json with new data" || echo "No changes to commit"
git push
# - name: Commit and push changes
# run: |
# git add src/data/leaderboard.json
# git commit -m "Update leaderboard.json with new data" || echo "No changes to commit"
# git push

Loading