change deploy.yaml
All checks were successful
Oracle-Deploy / redeploy (push) Successful in 2m28s

This commit is contained in:
2026-03-23 15:06:47 +08:00
parent 0d553222f8
commit b09f41decc

View File

@@ -11,14 +11,14 @@ jobs:
steps: steps:
- name: Preparation and Git Sync - name: Preparation and Git Sync
run: | run: |
# 建立目錄並進入 # 建立目錄
mkdir -p /home/ubuntu/apps/linebot_finance mkdir -p /home/ubuntu/apps/linebot_finance
cd /home/ubuntu/apps/linebot_finance cd /home/ubuntu/apps/linebot_finance
# 檢查是否已經有 .git沒有就 clone有就 reset # 核心邏輯:如果不是 Git 儲存庫,就清空它
if [ ! -d ".git" ]; then if [ ! -d ".git" ]; then
echo "🚚 正在初始化儲存庫..." echo "⚠️ 目錄已存在但非 Git 儲存庫,正在清空以重新初始化..."
# 使用 http://localhost:3000 是因為你的 Runner 跟 Gitea 在同一台主機且用了 network host rm -rf ..?* .[!.]* * # 刪除隱藏檔與一般檔案
git clone http://localhost:3000/henry4682/linebot_finance.git . git clone http://localhost:3000/henry4682/linebot_finance.git .
else else
echo "🔄 正在更新現有儲存庫..." echo "🔄 正在更新現有儲存庫..."