add summy 2027 data #29
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
| name: Update Leaderboard and Deploy | |
| on: | |
| push: | |
| paths: | |
| - 'database/*.csv' | |
| - 'generate_leaderboard.py' | |
| - 'index.html' | |
| branches: | |
| - main | |
| pull_request: | |
| paths: | |
| - 'database/*.csv' | |
| - 'generate_leaderboard.py' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| jobs: | |
| update-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Generate leaderboard and files.json | |
| run: python generate_leaderboard.py | |
| - name: Check for changes | |
| id: changes | |
| run: | | |
| git diff --quiet database/files.json || echo "changed=true" >> $GITHUB_OUTPUT | |
| - name: Commit changes | |
| if: steps.changes.outputs.changed == 'true' && github.event_name != 'pull_request' | |
| run: | | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git add database/files.json | |
| git commit -m "Update leaderboard [skip ci]" | |
| git push | |
| - name: Setup Pages | |
| if: github.event_name != 'pull_request' | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| if: github.event_name != 'pull_request' | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: '.' | |
| - name: Deploy to GitHub Pages | |
| if: github.event_name != 'pull_request' | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |