summaryrefslogtreecommitdiff
path: root/.github/workflows/update-and-deploy.yml
diff options
context:
space:
mode:
authorYuren Hao <97327730+YurenHao0426@users.noreply.github.com>2025-08-06 02:01:22 -0700
committerGitHub <noreply@github.com>2025-08-06 02:01:22 -0700
commite5cbd188c6fc654e8ababd37922c018bc8527c44 (patch)
treeaa89a6d2998ecfc60254e17fd0d3cdb5449a8248 /.github/workflows/update-and-deploy.yml
parent79ec5fd1f0188a88f937737185c542e644cf98e4 (diff)
parentcaa18e81e8eb03fb03a82d0d3526994c9ba41ac2 (diff)
Merge pull request #1 from YurenHao0426/codex/test-uiuc-api-cors-response
feat: scaffold prereq graph project
Diffstat (limited to '.github/workflows/update-and-deploy.yml')
-rw-r--r--.github/workflows/update-and-deploy.yml34
1 files changed, 34 insertions, 0 deletions
diff --git a/.github/workflows/update-and-deploy.yml b/.github/workflows/update-and-deploy.yml
new file mode 100644
index 0000000..fb034a6
--- /dev/null
+++ b/.github/workflows/update-and-deploy.yml
@@ -0,0 +1,34 @@
+name: grab-data-build-deploy
+
+on:
+ schedule:
+ - cron: "0 6 * * *"
+ push:
+ branches: [main]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 18
+ - run: npm ci
+ - name: Scrape UIUC catalog
+ env:
+ NODE_OPTIONS: --dns-result-order=ipv4first
+ run: npm run scrape
+ - name: Commit data
+ run: |
+ git config user.name "gh-bot"
+ git config user.email "bot@users.noreply.github.com"
+ git add data || true
+ git diff --cached --quiet || git commit -m "auto: update catalog"
+ - run: git push
+ - run: npm run build
+ - name: Deploy
+ uses: peaceiris/actions-gh-pages@v4
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ publish_dir: ./dist