diff --git a/.github/workflows/test_next_server.yml b/.github/workflows/test_next_server.yml index 538a435b..aa815983 100644 --- a/.github/workflows/test_next_server.yml +++ b/.github/workflows/test_next_server.yml @@ -43,6 +43,5 @@ jobs: - name: Run tests run: pnpm test - - - name: Build - run: pnpm build \ No newline at end of file + env: + NEXT_PUBLIC_IS_CI: true \ No newline at end of file diff --git a/www/app/lib/edgeConfig.ts b/www/app/lib/edgeConfig.ts index 5efcb837..5abdc38e 100644 --- a/www/app/lib/edgeConfig.ts +++ b/www/app/lib/edgeConfig.ts @@ -42,8 +42,9 @@ export async function getConfig() { return require("../../config-template").localConfig; } - if (process.env.NEXT_PUBLIC_ENV === "development" && !isCI) { - return require("../../config").localConfig; + if (process.env.NEXT_PUBLIC_ENV === "development") { + const configPath = "../../config"; + return require(configPath).localConfig; } let config = await get(edgeDomainToKey(domain)); diff --git a/www/app/lib/next.ts b/www/app/lib/next.ts index eb8d17ab..4cfea998 100644 --- a/www/app/lib/next.ts +++ b/www/app/lib/next.ts @@ -1,3 +1,6 @@ // next.js tries to run all the lib code during build phase; we don't always want it when e.g. we have connections initialized we don't want to have export const isBuildPhase = process.env.NEXT_PHASE?.includes("build"); -export const isCI = process.env.CI === "true" || process.env.IS_CI === "true"; +export const isCI = + process.env.CI === "true" || + process.env.IS_CI === "true" || + process.env.NEXT_PUBLIC_IS_CI === "true";