-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 管理的應用程式 |