Skip to content

Commit acbb11f

Browse files
Create update-citations.yml
1 parent f5a15cd commit acbb11f

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Update Google Scholar Citations
2+
3+
on:
4+
schedule:
5+
# Run weekly on Sunday at 12:00 AM UTC
6+
- cron: '0 0 * * 0'
7+
workflow_dispatch: # Allow manual triggering
8+
9+
jobs:
10+
update-citations:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.10'
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install -r requirements.txt
25+
pip install scholarly
26+
27+
- name: Run citation update script
28+
run: |
29+
python bin/update_scholar_citations.py
30+
31+
- name: Configure Git
32+
run: |
33+
git config --local user.email "actions@github.com"
34+
git config --local user.name "GitHub Actions"
35+
36+
- name: Commit and push if changed
37+
run: |
38+
git add _data/citations.yml
39+
git diff --staged --quiet || (git commit -m "Update Google Scholar citations" && git push)

0 commit comments

Comments
 (0)