-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (44 loc) · 1.42 KB
/
orcid-sync.yml
File metadata and controls
51 lines (44 loc) · 1.42 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
name: ORCID Sync
on:
schedule:
- cron: "0 3 * * 0"
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: python -m pip install --upgrade pip && pip install -r requirements.txt
- name: Sync ORCID
env:
ORCID_ID: "0000-0002-0546-5857"
UNPAYWALL_EMAIL: ${{ secrets.UNPAYWALL_EMAIL }}
run: |
python scripts/orcid_sync.py \
--orcid "$ORCID_ID" \
--bib-file publications/publications.bib \
--publications-dir publications \
--full
- name: Regenerate QMD files
run: |
python scripts/parsePubs.py \
--bib publications/publications.bib \
--out-dir publications \
--include-preprints
- name: Commit changes
run: |
if git status --porcelain | grep -q .; then
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add publications/publications.bib publications publications/preprints
git commit -m "chore: sync ORCID publications"
git push
else
echo "No changes to commit."
fi