Skip to content

Commit

Permalink
Added new workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dallascrichmond committed Dec 18, 2024
1 parent ea39da5 commit e0d0d7a
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/prisma-migrations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Prisma Migrations

on:
push:
paths:
- 'backend/prisma/**'
pull_request:
paths:
- 'backend/prisma/**'

jobs:
run-migrations:
name: Run Prisma Migrations
runs-on: ubuntu-22.04

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

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: |
cd backend
npm ci
- name: Run Prisma Migrations
env:
DATABASE_URL: "postgresql://${{ secrets.DB_USER }}:${{ secrets.DB_PASSWORD }}@nr-nmp-database-${{ github.event.number }}:${{ secrets.DB_PORT }}/${{ secrets.DB_NAME }}?schema=public"
run: |
cd backend
npx prisma migrate deploy

0 comments on commit e0d0d7a

Please sign in to comment.