mirror of
https://github.com/henry4682/fin_buddy_fe.git
synced 2026-07-16 01:30:00 +00:00
fix: change deploy.yaml
All checks were successful
Deploy Frontend to 1Panel / build-and-deploy (push) Successful in 17s
All checks were successful
Deploy Frontend to 1Panel / build-and-deploy (push) Successful in 17s
This commit is contained in:
@@ -20,23 +20,16 @@ jobs:
|
|||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: npm install
|
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
|
# 🎯 關鍵步驟:在 Build 之前,把 Secret 倒出來變成 .env.production
|
||||||
- name: Generate Environment Variables
|
- name: Generate Environment Variables
|
||||||
run: |
|
run: |
|
||||||
cat << 'EOF' > .env.production
|
cat << 'EOF' > .env.production
|
||||||
${{ secrets.ENV_FILE }}
|
${{ secrets.ENV_FILE }}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
- name: Build Project
|
||||||
|
run: npm run build # 🎯 Vite 會在這裡讀取剛剛產生的 .env.production,把網址寫死進去!
|
||||||
|
|
||||||
- name: Stream Dist out of Container
|
- name: Stream Dist out of Container
|
||||||
run: |
|
run: |
|
||||||
tar -czf - -C dist . | nc -w 3 localhost 9999 || true
|
tar -czf - -C dist . | nc -w 3 localhost 9999 || true
|
||||||
|
|||||||
Reference in New Issue
Block a user