mirror of
https://github.com/henry4682/fin_buddy_fe.git
synced 2026-07-16 01:30:00 +00:00
fix: add config
Some checks failed
Deploy Frontend to 1Panel / build-and-deploy (push) Failing after 23s
Some checks failed
Deploy Frontend to 1Panel / build-and-deploy (push) Failing after 23s
This commit is contained in:
36
.gitea/workflows/deploy.yml
Normal file
36
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Deploy Frontend to 1Panel
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main # 🎯 或者是 master,看你的預設分支是哪一個
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18 # 🎯 對齊你的 Node 版本
|
||||
|
||||
- name: Install Dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Build Project
|
||||
run: npm run build # 🎯 編譯出 dist 資料夾
|
||||
|
||||
- name: Deploy to Server via SSH
|
||||
uses: appleboy/scp-action@master
|
||||
with:
|
||||
host: ${{ secrets.SERVER_HOST }}
|
||||
username: ${{ secrets.SERVER_USER }}
|
||||
key: ${{ secrets.SERVER_SSH_KEY }}
|
||||
port: 22
|
||||
source: "dist/*"
|
||||
# 🎯 筆直射進 1Panel 幫這個網域開闢的預設靜態網頁執行目錄
|
||||
target: "/www/sites/fin-buddy.duckdns.org/index/"
|
||||
strip_components: 1
|
||||
@@ -3,7 +3,7 @@ import axios from 'axios'
|
||||
|
||||
const api = axios.create({
|
||||
baseURL: import.meta.env.VITE_BACKEND_URL,
|
||||
withCredentials: false,
|
||||
withCredentials: true,
|
||||
})
|
||||
|
||||
// 每次 request 自動帶 token
|
||||
|
||||
Reference in New Issue
Block a user