mirror of
https://github.com/henry4682/linebot_finance.git
synced 2026-05-16 04:41:52 +00:00
change deploy.yaml ver 6.
This commit is contained in:
@@ -3,16 +3,18 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
redeploy:
|
||||
# 這裡不要用 ubuntu-latest,改用你 Runner 名稱或自定義標籤
|
||||
# 如果你在 Gitea 看到它的標籤有 self-hosted,就填 self-hosted
|
||||
runs-on: self-hosted
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Deploy
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Deploy via SSH
|
||||
run: |
|
||||
echo "==== 目前正在主機直接執行 ===="
|
||||
whoami
|
||||
cd /home/ubuntu/apps/linebot_finance
|
||||
echo "${{ secrets.ORACLE_SSH_KEY }}" > /tmp/deploy_key
|
||||
chmod 600 /tmp/deploy_key
|
||||
ssh -i /tmp/deploy_key -o StrictHostKeyChecking=no ubuntu@64.110.81.100 "
|
||||
cd /home/ubuntu/apps/linebot_finance &&
|
||||
git pull &&
|
||||
docker compose up -d --build
|
||||
"
|
||||
Reference in New Issue
Block a user