-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (34 loc) · 1.15 KB
/
parsing.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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