Skip to content

Update Publications

Update Publications #1

name: Update Publications
on:
workflow_dispatch:
schedule:
- cron: '0 8 * * 1'
permissions:
contents: write
jobs:
update-publications:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Refresh publications dataset
env:
OPENALEX_AUTHOR_ID: A5081714132
OPENALEX_MAILTO: hdsp@uis.edu.co
OPENALEX_API_KEY: ${{ secrets.OPENALEX_API_KEY }}
run: node ./scripts/fetch-openalex-publications.mjs
- name: Commit updated dataset
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add src/data/openalex-publications.json
git diff --cached --quiet && exit 0
git commit -m "chore: update publications data"
git push