Skip to content

Deploy to Linux Server #32

Deploy to Linux Server

Deploy to Linux Server #32

Workflow file for this run

name: Deploy to Linux Server
on:
push:
branches: ["*"]
pull_request:
branches: ["*"]
schedule:
- cron: '0 0 * * *' # Run at midnight (00:00 UTC) every day
jobs:
gtfs-check:
name: GTFS feeds check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Check GTFS feeds
run: python .github/scripts/check_gtfs_feeds.py
realtime-check:
name: Realtime feeds check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Check Realtime feeds
run: python .github/scripts/check_realtime_feeds.py
deploy:
if: github.ref == 'refs/heads/main'
needs: [gtfs-check, realtime-check]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up SSH key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Add server to known_hosts
run: |
ssh-keyscan 217.182.174.221 >> ~/.ssh/known_hosts
- name: Copy files to server
run: |
rsync -avz --delete --exclude='.git*' ./ [email protected]:/var/www/html/hexatransit/datasets/data
env:
SSH_AUTH_SOCK: ${{ env.SSH_AUTH_SOCK }}