Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
continue-on-error: false
env:
NEXT_TELEMETRY_DISABLED: 1
SKIP_ENV_VALIDATION: 1

- name: Generate build summary
if: always()
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ COPY . .
# Uncomment the following line in case you want to disable telemetry during the build.
ENV NEXT_TELEMETRY_DISABLED=1
ENV NEXT_PUBLIC_MOCK_USER=''
ENV SKIP_ENV_VALIDATION=1

# Install pnpm and generate Prisma client before build
RUN npm install -g pnpm && \
Expand Down
6 changes: 6 additions & 0 deletions lib/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,10 @@ export const env = createEnv({
experimental__runtimeEnv: {
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY,
},
/*
* Skip validation during build time (e.g., in CI/CD)
* Set SKIP_ENV_VALIDATION=1 to skip validation
* Runtime validation will still occur if env vars are accessed
*/
skipValidation: !!process.env.SKIP_ENV_VALIDATION,
})