From 8f8e115c8feced731cf3a05fe25c2c02f9da96d2 Mon Sep 17 00:00:00 2001 From: longwind48 Date: Sun, 15 Dec 2024 23:03:15 +0800 Subject: [PATCH] ci: generate static files by force export to out/ dir --- .github/workflows/firebase-hosting-staging.yml | 5 +++-- frontend/firebase.json | 2 +- frontend/next.config.mjs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/firebase-hosting-staging.yml b/.github/workflows/firebase-hosting-staging.yml index 8b1dfd1..94d22bd 100644 --- a/.github/workflows/firebase-hosting-staging.yml +++ b/.github/workflows/firebase-hosting-staging.yml @@ -38,12 +38,13 @@ jobs: cd frontend npm ci npm run build - ls -la + echo "Checking build output directory:" + ls -la out/ - name: Debug directory structure run: | pwd ls -la frontend/ - ls -la frontend/.next/ + ls -la frontend/out/ - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: ${{ secrets.GITHUB_TOKEN }} diff --git a/frontend/firebase.json b/frontend/firebase.json index cdbd840..b2d48bc 100644 --- a/frontend/firebase.json +++ b/frontend/firebase.json @@ -1,7 +1,7 @@ { "hosting": { "target": "staging", - "public": ".next", + "public": "out", "ignore": [ "firebase.json", "**/.*", diff --git a/frontend/next.config.mjs b/frontend/next.config.mjs index 6e2ebc6..f9e64df 100644 --- a/frontend/next.config.mjs +++ b/frontend/next.config.mjs @@ -1,6 +1,6 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - // output: 'export', + output: 'export', env: { APP_ENV: process.env.APP_ENV || 'development', },