diff --git a/.github/workflows/.deploy.yml b/.github/workflows/.deploy.yml index 6490571..0ce3ae6 100644 --- a/.github/workflows/.deploy.yml +++ b/.github/workflows/.deploy.yml @@ -82,6 +82,14 @@ jobs: verification_path: /api/health verification_retry_attempts: "5" verification_retry_seconds: "15" + - name: Install dependencies + run: | + cd backend + npm ci + - name: Run Prisma Migrations + run: | + cd backend + npx prisma migrate deploy frontend: name: Frontend diff --git a/.github/workflows/prisma-migrations.yml b/.github/workflows/prisma-migrations.yml deleted file mode 100644 index e29e56c..0000000 --- a/.github/workflows/prisma-migrations.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Prisma Migrations - -on: - workflow_run: - workflows: [".deploy", "merge", "pr-open", "pr-close"] # Add the names of all the workflows that should run before this one - types: - - completed - -jobs: - run-migrations: - name: Run Prisma Migrations - runs-on: ubuntu-22.04 - if: ${{ github.event.workflow_run.conclusion == 'success' }} - - 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