From ed8a0ba8df6709314ba1c3fd28fa85fe14e55c7e Mon Sep 17 00:00:00 2001 From: henry yo Date: Tue, 30 Jun 2026 17:47:06 +0800 Subject: [PATCH] fix: change deploy.yaml --- .gitea/workflows/deploy.yaml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 29bb7e3..4a9959d 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -20,23 +20,16 @@ jobs: - name: Install Dependencies run: npm install - # 🎯 關鍵新增:在 Build 之前,強行產生 .env.production - - name: Inject Environment Variables - run: | - echo "VITE_BACKEND_URL=https://fin-buddy.duckdns.org/api/v1" > .env.production - - - name: Build Project - run: npm run build # 🎯 Vite 會在這裡讀取剛剛產生的 .env.production,把網址寫死進去! - - name: Install Dependencies - run: npm install - # 🎯 關鍵步驟:在 Build 之前,把 Secret 倒出來變成 .env.production - name: Generate Environment Variables run: | cat << 'EOF' > .env.production ${{ secrets.ENV_FILE }} EOF - + + - name: Build Project + run: npm run build # 🎯 Vite 會在這裡讀取剛剛產生的 .env.production,把網址寫死進去! + - name: Stream Dist out of Container run: | tar -czf - -C dist . | nc -w 3 localhost 9999 || true