Skip to content

Deploy

Deploy #1

Workflow file for this run

name: Deploy
on:
workflow_run:
workflows: ['Tests']
types:
- completed
jobs:
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' && github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/build
- name: Apply database migrations
run: pnpx prisma migrate deploy
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
- name: Install Railway CLI
run: pnpm add --global @railway/cli
- name: Deploy to Railway
run: railway up --service="nestjs-starter"
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
REDIS_URL: ${{ secrets.REDIS_URL }}