-
-
Notifications
You must be signed in to change notification settings - Fork 23
50 lines (48 loc) · 1.53 KB
/
fetch-data.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
44
45
46
47
48
49
50
name: Data Fetching
on:
push:
schedule:
- cron: "5 19 * * *"
workflow_dispatch:
jobs:
Fetch-Route-Data:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Setup Python environment
uses: actions/setup-python@v2
with:
python-version: '3.8'
architecture: 'x64'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r ./crawling/requirements.txt
- name: Crawling resources
run: |
python ./crawling/parseHoliday.py
python ./crawling/ctb.py
python ./crawling/kmb.py
python ./crawling/nlb.py
python ./crawling/lrtfeeder.py
python ./crawling/lightRail.py
python ./crawling/mtr.py
python ./crawling/parseJourneyTime.py
python ./crawling/parseGtfs.py
python ./crawling/gmb.py
python ./crawling/matchGtfs.py
python ./crawling/cleansing.py
python ./crawling/mergeRoutes.py
- name: Update MD5
run: md5sum routeFareList.min.json | cut -f1 -d ' ' | tr -d $'\n' > routeFareList.md5
- name: Update resources
uses: test-room-7/action-update-file@v1
with:
file-path: |
routeFareList.json
routeFareList.min.json
routeFareList.md5
commit-msg: Update resources
github-token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages