Update Google Scholar Citations #17
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 Google Scholar Citations | |
| on: | |
| schedule: | |
| - cron: "0 22 * * *" | |
| workflow_dispatch: # Allow manual triggering | |
| jobs: | |
| update-citations: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run citation update script | |
| run: | | |
| python bin/update_scholar_citations.py | |
| - name: Configure Git | |
| run: | | |
| git config --local user.email "actions@github.com" | |
| git config --local user.name "GitHub Actions" | |
| - name: Commit and push if changed | |
| run: | | |
| git add _data/citations.yml | |
| git diff --staged --quiet || (git commit -m "Update Google Scholar citations" && git push) |