Files
fin_buddy_fe/.gitea/workflows/deploy.yaml
henry yo ed8a0ba8df
All checks were successful
Deploy Frontend to 1Panel / build-and-deploy (push) Successful in 17s
fix: change deploy.yaml
2026-06-30 17:47:06 +08:00

36 lines
882 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Deploy Frontend to 1Panel
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-22.04
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 22
- 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