Skip to content

Update Publications from Google Scholar #1

Update Publications from Google Scholar

Update Publications from Google Scholar #1

name: Update Publications from Google Scholar
on:
schedule:
- cron: '0 0 * * 0' # Run every Sunday at midnight UTC
workflow_dispatch: # Allow manual trigger from GitHub UI
jobs:
update-publications:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: |
pip install scholarly pyyaml
- name: Update publications
run: |
python scripts/update_publications.py
env:
SCHOLAR_ID: ${{ secrets.SCHOLAR_ID }}
- name: Check for changes
id: verify-changed-files
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "changed=true" >> $GITHUB_OUTPUT
else
echo "changed=false" >> $GITHUB_OUTPUT
fi
- name: Commit and push changes
if: steps.verify-changed-files.outputs.changed == 'true'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add _data/publications.yml
git commit -m "🤖 Auto-update publications from Google Scholar"
git push