name: CI

on:
  push:
    branches: ["main", "develop", "codex/**"]
  pull_request:

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Setup Node
        uses: actions/setup-node@v4
        with:
          node-version: 22
          cache: npm

      - name: Install deps
        run: npm ci

      - name: Generate Prisma client
        run: npm run db:generate

      - name: Build workspaces
        run: npm run build
