Skip to content

Sync Publications from Semantic Scholar #1

Sync Publications from Semantic Scholar

Sync Publications from Semantic Scholar #1

name: Sync Publications from Semantic Scholar
on:
schedule:
# Runs every Monday at 06:00 UTC
- cron: '0 6 * * 1'
workflow_dispatch: # Allow manual trigger
permissions:
contents: write
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Sync publications from Semantic Scholar
run: node scripts/sync-publications.cjs
- name: Check for changes
id: changes
run: |
git diff --quiet || echo "has_changes=true" >> "$GITHUB_OUTPUT"
- name: Commit and push
if: steps.changes.outputs.has_changes == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add src/data/publications.ts src/data/publication-overrides.json
git commit -m "chore: sync publications from Semantic Scholar"
git push