Update Publications from ORCID #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |