Skip to content

Sync stations

Sync stations #2

Workflow file for this run

name: Sync stations
on:
workflow_dispatch:
push:
branches:
- master
paths:
- 'stations/*.json'
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pandas
- name: Create stations.db
run: python database.py
- name: Commit Files
run: |
git config --local user.email "${{ vars.GIT_EMAIL }}"
git config --local user.name "${{ vars.GIT_USER }}"
git add -A
git diff-index --quiet HEAD || (git commit -a -m "Sync stations" --allow-empty)
- name: Push Changes
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
- name: Upload stations.db
uses: bayssmekanique/action-simple-file-upload@v2
with:
user: ${{ secrets.FTP_USER }}
password: ${{ secrets.FTP_PASSWORD }}
host: ${{ secrets.FTP_HOST }}
src: stations.db
dest: stations.db