-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (48 loc) · 1.35 KB
/
deploy.yml
File metadata and controls
59 lines (48 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Update Publications
on:
push:
branches: [ gh-pages ]
workflow_dispatch:
schedule:
- cron: "0 7 * * 0" # Sundays 07:00 UTC
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: scholar-update
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Python deps
run: |
python -m pip install --upgrade pip
pip install scholarly
pip install bibtexparser
# - name: Update publications file
# run: |
# python scripts/update_pubs.py
- name: Merge into publications.bib
run: |
python scripts/merge_bibs.py
- name: Commit & push if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add -A
git status --porcelain
git diff --cached --stat
if git diff --cached --quiet; then
echo "No changes to commit."
exit 0
fi
git commit -m "chore: update publications from Google Scholar"
git push