Skip to content

Merge pull request #14 from include-davis/feat/typescript-migration #6

Merge pull request #14 from include-davis/feat/typescript-migration

Merge pull request #14 from include-davis/feat/typescript-migration #6

Workflow file for this run

name: Staging Deployment
on:
push:
branches:
- 'main'
jobs:
deploy_staging:
name: Deploy Staging
runs-on: ubuntu-latest
environment:
name: staging
url: ${{ vars.ENV_URL }}
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version: '21.1.0'
- name: Install dependencies
run: npm install
- name: Install railway
run: npm install -g @railway/[email protected]
- name: Lint check
run: npm run lint
- name: Sync Prisma to Env
run: npx prisma generate
- name: Schema check and generation
run: npm run schema:gen
- name: Run Migrations
run: npm run db:migrate
- name: Deploy image to Railway
run: >
RAILWAY_TOKEN=${{ secrets.RAILWAY_TOKEN }}
railway up
--service "apollo"
-d
- name: Success
run: echo "🛠️ Deploy successful 🛠️"