Skip to content

Update Scholar Stats #467

Update Scholar Stats

Update Scholar Stats #467

name: Update Scholar Stats
on:
schedule:
- cron: "0 */12 * * *" # run every 12 hours
workflow_dispatch: # allow manual trigger
jobs:
run:
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: |
pip install scholarly==1.7.11
- name: Run Google Scholar Script
run: |
python google_scholar_crawler/main.py
- name: Commit updated stats.json
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Actions"
git add google_scholar_crawler/stats.json
git commit -m "Update Google Scholar stats" || echo "No changes to commit"
- name: Push Changes
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}