Skip to content

Update Google Scholar citations #29

Update Google Scholar citations

Update Google Scholar citations #29

name: Update Google Scholar citations
on:
schedule:
- cron: "17 */6 * * *"
workflow_dispatch:
permissions:
contents: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Update citation cache
env:
SERPAPI_KEY: ${{ secrets.SERPAPI_KEY }}
run: python scripts/update_scholar_citations.py
- name: Commit citation cache
run: |
if git diff --quiet -- assets/data/scholar-citations.json; then
echo "Citation cache is already up to date."
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add assets/data/scholar-citations.json
git commit -m "Update Google Scholar citation cache"
git push