Skip to content

ORCID Sync

ORCID Sync #3

Workflow file for this run

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