Skip to content

GH deploy action

GH deploy action #7

Workflow file for this run

name: Deploy to Railway
on:
push:
branches:
- master
- dev
paths-ignore:
- 'README.md'
- 'app_config.wsgi'
- 'deploy.py'
- 'LICENSE'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install Railway CLI
run: curl -fsSL https://railway.app/install.sh | sh
- name: Deploy to Railway
run: |
if [ "${GITHUB_REF}" == "refs/heads/master" ]; then
RAILWAY_TOKEN="${{ secrets.RAILWAY_TOKEN_PROD }}" railway up --environment production --service mastodon-gender-distribution
elif [ "${GITHUB_REF}" == "refs/heads/dev" ]; then
RAILWAY_TOKEN="${{ secrets.RAILWAY_TOKEN_DEV }}" railway up --environment dev --service mastodon-gender-distribution
fi