Skip to content

Merge pull request #33 from willwearing/fix/vercel-build-errors #26

Merge pull request #33 from willwearing/fix/vercel-build-errors

Merge pull request #33 from willwearing/fix/vercel-build-errors #26

Workflow file for this run

name: CI & Deploy
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.6"
- name: Install dependencies
run: bun install
- name: Build shared package
run: cd packages/shared && bun run build
- name: Generate Prisma client
run: cd backend && bun x prisma generate
- name: Type check backend
run: cd backend && bun x tsc -p tsconfig.build.json --noEmit
- name: Type check frontend
run: cd apps/web && bun x tsc --noEmit
- name: Run backend tests
run: cd backend && bun run test
- name: Run frontend tests
run: cd apps/web && bun run test
deploy-backend:
name: Deploy Backend
needs: test
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Railway CLI
run: npm install -g @railway/cli
- name: Deploy backend to Railway
run: railway up --service ${{ vars.RAILWAY_SERVICE_NAME }}
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
# Frontend deploys automatically via Vercel git integration