Skip to content

Commit

Permalink
update path
Browse files Browse the repository at this point in the history
  • Loading branch information
Wcc723 committed Sep 15, 2023
1 parent 7e65fe1 commit ddb0b01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pm2-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ jobs:
# 請將 'hostname' 替換為你的服務器地址,例如 IP 地址或域名

- name: Transfer files # 第六步,傳輸文件
run: rsync -avz --delete ./ [email protected]:/websample/ # 使用 rsync 命令將文件傳輸到虛擬主機
run: rsync -avz --delete ./ [email protected]:/websample/node-ironman-sample-2023 # 使用 rsync 命令將文件傳輸到虛擬主機
# user@hostname 請替換成相應的帳號及主機位置(ip 或網址)
env:
ENV_VARIABLE: ${{ secrets.ENV_VARIABLE }} # 從 GitHub Secrets 中取得環境變數的值
# user@hostname 請替換成相應的帳號及主機位置(ip 或網址)

- name: Restart PM2 # 第八步,重啟 PM2
run: ssh [email protected] 'cd /websample/ && pm2 restart www --update-env' # 透過 SSH 連到虛擬主機,然後進到應用程式的目錄,並重啟所有 PM2 管理的應用程式
run: ssh [email protected] 'cd /websample/node-ironman-sample-2023 && pm2 restart www --update-env' # 透過 SSH 連到虛擬主機,然後進到應用程式的目錄,並重啟所有 PM2 管理的應用程式

0 comments on commit ddb0b01

Please sign in to comment.