From b985c2664effaea78e07a01bf3c1d620af044451 Mon Sep 17 00:00:00 2001 From: chrox Date: Fri, 6 Dec 2024 22:49:36 +0100 Subject: [PATCH] Add NEXT_PUBLIC_APP_PLATFORM env variable in github workflow --- .github/workflows/release.yml | 1 + apps/readest-app/next.config.mjs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c2fb5ebf..4b4bb695 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -88,6 +88,7 @@ jobs: echo "NEXT_PUBLIC_POSTHOG_KEY=${{ secrets.NEXT_PUBLIC_POSTHOG_KEY }}" >> .env.local echo "NEXT_PUBLIC_POSTHOG_HOST=${{ secrets.NEXT_PUBLIC_POSTHOG_HOST }}" >> .env.local echo "NEXT_PUBLIC_DEEPL_API_KEY=${{ secrets.NEXT_PUBLIC_DEEPL_API_KEY }}" >> .env.local + echo "NEXT_PUBLIC_APP_PLATFORM=tauri" >> .env.local - name: Copy .env.local to apps/readest-app run: cp .env.local apps/readest-app/.env.local diff --git a/apps/readest-app/next.config.mjs b/apps/readest-app/next.config.mjs index 13b54a4b..0ba53b8c 100644 --- a/apps/readest-app/next.config.mjs +++ b/apps/readest-app/next.config.mjs @@ -7,7 +7,7 @@ const internalHost = process.env.TAURI_DEV_HOST || 'localhost'; const nextConfig = { // Ensure Next.js uses SSG instead of SSR // https://nextjs.org/docs/pages/building-your-application/deploying/static-exports - output: process.env['NEXT_PUBLIC_APP_PLATFORM'] === 'web' ? undefined : 'output', + output: process.env['NEXT_PUBLIC_APP_PLATFORM'] === 'web' ? undefined : 'export', // Note: This feature is required to use the Next.js Image component in SSG mode. // See https://nextjs.org/docs/messages/export-image-api for different workarounds. images: {