Ci now also runs prisma generate before building
continuous-integration/drone/push Build is passing Details

main
Guus van Meerveld 1 year ago
parent 534726998f
commit ac65499830
Signed by: Guusvanmeerveld
GPG Key ID: 2BA7D7912771966E

@ -7,6 +7,7 @@ steps:
image: node:16-alpine image: node:16-alpine
commands: commands:
- yarn install - yarn install
- yarn run prisma:generate
- yarn lint - yarn lint
- yarn test-build - yarn test-build

@ -2,7 +2,6 @@ FROM node:lts-alpine AS deps
WORKDIR /app WORKDIR /app
COPY package.json yarn.lock prisma ./ COPY package.json yarn.lock prisma ./
RUN npx prisma generate
RUN yarn install --frozen-lockfile RUN yarn install --frozen-lockfile
FROM node:lts-alpine AS builder FROM node:lts-alpine AS builder
@ -10,6 +9,7 @@ WORKDIR /app
COPY . . COPY . .
COPY --from=deps /app/node_modules ./node_modules COPY --from=deps /app/node_modules ./node_modules
ENV NEXT_TELEMETRY_DISABLED 1; ENV NEXT_TELEMETRY_DISABLED 1;
RUN yarn run prisma:generate
RUN yarn build && yarn install --production --ignore-scripts --prefer-offline RUN yarn build && yarn install --production --ignore-scripts --prefer-offline
FROM node:lts-alpine AS runner FROM node:lts-alpine AS runner

@ -4,6 +4,7 @@
"dev": "next dev", "dev": "next dev",
"build": "next build", "build": "next build",
"start": "next start", "start": "next start",
"prisma:generate": "prisma generate",
"export": "next build && next export", "export": "next build && next export",
"test-build": "tsc", "test-build": "tsc",
"lint": "next lint", "lint": "next lint",

Loading…
Cancel
Save