Skip to content

Commit

Permalink
Merge branch 'master' into create-post-list
Browse files Browse the repository at this point in the history
  • Loading branch information
minhphuc010194 committed Sep 8, 2023
2 parents e19db48 + b0533cb commit 3091bd5
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .github/workflows/prisma-production.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Prisma Production

on:
push:
branches:
- master
paths:
- "prisma/**"

jobs:
prisma-production:
if: >-
github.event.pull_request.user.login != 'renovate' &&
github.event.pull_request.user.login != 'renovate[bot]'
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"

- name: Install dependencies
run: pnpm i --frozen-lockfile

- name: Deploy Migrations
run: pnpm run migrate:deploy
env:
POSTGRES_PRISMA_URL: ${{ secrets.POSTGRES_PRISMA_URL }}
POSTGRES_URL_NON_POOLING: ${{ secrets.POSTGRES_URL_NON_POOLING }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"db:generate": "prisma generate",
"db:push": "prisma db push --skip-generate",
"migrate:dev": "prisma migrate dev",
"postinstall": "npm run db:generate",
"migrate:deploy": "prisma migrate deploy",
"postinstall": "pnpm db:generate",
"dev": "docker-compose up -d && next dev",
"lint": "eslint ./ --ext .ts,.tsx",
"build": "next build",
Expand Down

0 comments on commit 3091bd5

Please sign in to comment.