Skip to content

Collect Static Facility Info #1

Collect Static Facility Info

Collect Static Facility Info #1

name: Collect Static Facility Info
on:
schedule:
- cron: '0 15 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
collect-static:
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: scripts/package.json
- name: Install dependencies
run: npm ci
working-directory: scripts
- name: Collect static facilities
env:
SEOUL_API_KEY: ${{ secrets.SEOUL_API_KEY }}
run: node collect-static.js
working-directory: scripts
- name: Build latest.json
run: node build-latest.js || echo "Skipped (no realtime data yet)"
working-directory: scripts
- name: Commit data
uses: stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403 # v5
with:
commit_message: 'chore: update static facility data'
file_pattern: 'data-static/** web/public/data/**'