Data Fetching #867
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 requirements.txt | |
- name: Crawling resources | |
run: | | |
python parseHoliday.py | |
python ctb-nwfb.py | |
python kmb.py | |
python nlb.py | |
python lrtfeeder.py | |
python lightRail.py | |
python mtr.py | |
python parseJourneyTime.py | |
python parseGtfs.py | |
python gmb.py | |
python matchGtfs.py | |
python cleansing.py | |
python mergeRoutes.py | |
- name: Update MD5 | |
run: md5sum routeFareList.min.json | cut -f1 -d ' ' > 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 |