Skip to content

parsing busschedule data #53

parsing busschedule data

parsing busschedule data #53

Workflow file for this run

name: parsing busschedule data
on:
schedule:
- cron: "0 15 * * *"
jobs:
update-busschedule:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Set timezone to KST
run: |
sudo ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime
echo "Timezone set to KST: $(date)"
- name: Install Dependencies
run: npm install
- name: Run Bus Schedule Parser
run: BUS_ID=${{secrets.BUS_ID}} BUS_PS=${{secrets.BUS_PS}} npx ts-node busschedule-parser.ts
- name: Ensure we are on the correct branch
run: |
git fetch origin main
git checkout main
- name: Commit and Push Updates
run: |
git config --local user.email "[email protected]"
git config --local user.name "Singhic"
git add public/parser.json
git status # 변경사항 확인
git commit -m "Fetch: Update busschedule data" || echo "No changes to commit"
git push origin main