name: Deploy Production
on:
workflow_dispatch:
jobs:
deploy:
name: Deploy to production
runs-on: ubuntu-latest
container: ghcr.io/railwayapp/cli:latest
environment:
name: production
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
RAILWAY_GIT_COMMIT_SHA: ${{ github.sha }}
steps:
- uses: actions/checkout@v7
- run: railway --version
- run: railway config plan
- run: railway config apply --yes
- run: railway up --ci --service=frontend
background: true
- run: railway up --ci --service=worker.high
background: true
- run: railway up --ci --service=worker.default
background: true
- run: railway up --ci --service=worker.low
background: true
- run: railway up --ci --service=worker.webhooks
background: true
- name: Wait for all deployments
wait-all:
Example github action: