Skip to content

Commit

Permalink
ci: add prisma:generate
Browse files Browse the repository at this point in the history
  • Loading branch information
iamnivekx committed Apr 24, 2024
1 parent 5be9fe5 commit dd3dd11
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,39 @@
# https://www.prisma.io/docs/orm/prisma-client/deployment/deploy-database-changes-with-prisma-migrate
name: Deploy
name: Lint

on:
pull_request:
branches: '**'
push:
branches:
- main
paths:
- prisma/**
branches: [dev, main]

# Cancel in-progress workflow runs on PRs when a new commit is pushed.
# Does not cancel any runs on `develop` or `master` branches.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
deploy:
code:
runs-on: ubuntu-latest
strategy:
matrix:
node: [18]
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 9
version: 8
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- run: pnpm run build
- name: Apply all pending migrations to the database
run: pnpm run prisma:migrate:deploy
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
- name: Run Prettier
run: pnpm run format:check
- name: Run prisma genarate
run: pnpm run prisma:generate
- name: Run test
run: pnpm run test

0 comments on commit dd3dd11

Please sign in to comment.