Skip to content

Commit

Permalink
fix: simplify the deployment focusing on the database update if required
Browse files Browse the repository at this point in the history
  • Loading branch information
brolag committed Oct 30, 2024
1 parent 1065363 commit 8920908
Showing 1 changed file with 5 additions and 22 deletions.
27 changes: 5 additions & 22 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
name: CI/CD Pipeline
name: Database Migration Pipeline

on:
push:
branches:
- main
paths:
- 'apps/web/**'
- 'packages/**'
- 'prisma/**'
- 'prisma/**'
pull_request:
branches:
- main

jobs:
deploy:
migrate:
runs-on: ubuntu-latest
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
Expand All @@ -27,23 +25,8 @@ jobs:
with:
node-version: '18'

- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install dependencies
run: bun install
run: npm install -g prisma

- name: Run Prisma migrations
run: npx prisma migrate deploy

- name: Run build
run: npm run build

- name: Deploy to Vercel
uses: amondnet/vercel-action@v20
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
run: prisma migrate deploy

0 comments on commit 8920908

Please sign in to comment.