diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f691d9c..1268d31 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,9 +14,12 @@ jobs: uses: actions/setup-node@v3 with: node-version: '20' - + - name: Install Dependencies run: npm install - + + - name: Generate Prisma Client + run: npm run db:generate + - name: Run Build - run: npm run build + run: npm run build \ No newline at end of file diff --git a/build.yml b/build.yml new file mode 100644 index 0000000..f691d9c --- /dev/null +++ b/build.yml @@ -0,0 +1,22 @@ +name: Build on PR + +on: + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + + - name: Install Dependencies + run: npm install + + - name: Run Build + run: npm run build diff --git a/package.json b/package.json index dbddf4e..23f13fd 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "dev": "turbo dev", "lint": "turbo lint", "format": "prettier --write \"**/*.{ts,tsx,md}\"", - "start-user-app": "cd ./apps/user-app && npm run start" + "start-user-app": "cd ./apps/user-app && npm run start", + "db:generate": "cd packages/db && npx prisma generate && cd ../.." }, "devDependencies": { "@repo/eslint-config": "*", diff --git a/.github/workflows/push.yml b/push.yml similarity index 100% rename from .github/workflows/push.yml rename to push.yml