Skip to content

Sync Syllabus

Sync Syllabus #684

name: Sync Syllabus
on:
push:
paths:
- 'universities/**'
branches:
- main
schedule:
- cron: '0 */6 * * *'
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Check if the repository is a fork
run: |
if [[ "${GITHUB_REPOSITORY}" != "The-Purple-Movement/WikiSyllabus" ]]; then
echo "This workflow does not run on forks."
exit 0
fi
- name: Checkout Beyond-Syllabus repository
uses: actions/checkout@v5
with:
repository: The-Purple-Movement/Beyond-Syllabus
ref: main
token: ${{ secrets.GH_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@v4
- name: Install dependencies
run: npm install
- name: Run update script
run: npm run patch
- name: Set up Git config
run: |
git config --global user.name "alvin-dennis"
git config --global user.email "alvindennis80@gmail.com"
- name: Push Changes
run: |
git add apps/server/src/routes/syllabus/syllabus.json
git commit -m "chore: Updated syllabus.json from WikiSyllabus" || echo "No changes to commit"
git push origin main