Skip to content

Update Publications from ORCID #1

Update Publications from ORCID

Update Publications from ORCID #1

name: Update Publications from ORCID
on:
schedule:
- cron: "0 3 * * 1" # Every Monday at 03:00 UTC
workflow_dispatch: # Allow manual trigger from GitHub Actions UI
permissions:
contents: write
jobs:
fetch-publications:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: npm ci
- name: Fetch publications from ORCID public API
run: node scripts/fetch-publications.js
- name: Commit updated publications if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add _data/publications.json
if git diff --staged --quiet; then
echo "No changes to publications.json"
else
git commit -m "chore: update publications from ORCID"
git push
fi