name: Oracle-Deploy on: push: branches: - main jobs: redeploy: runs-on: self-hosted # 這裡確保對應到你的 Runner 標籤 container: image: "" # <--- 最關鍵的一行!設為空字串,強迫它在 Host 執行 steps: - name: Sync and Deploy run: | cd /home/ubuntu/apps/linebot_finance || exit 1 git fetch origin main git reset --hard origin/main # 直接使用絕對路徑呼叫 Docker /usr/bin/docker compose up -d --build --remove-orphans /usr/bin/docker image prune -f