-
Notifications
You must be signed in to change notification settings - Fork 3
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
xiajieqiong
committed
Sep 18, 2023
1 parent
a4d7fa8
commit 7742bb6
Showing
1 changed file
with
10 additions
and
10 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 |
---|---|---|
|
@@ -53,16 +53,16 @@ jobs: | |
- name: Build | ||
run: pnpm run build | ||
|
||
- name: Deploy to Server # 第二步,rsync推文件 | ||
uses: AEnterprise/rsync-[email protected] # 使用别人包装好的步骤镜像 | ||
env: | ||
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} # 引用配置,SSH私钥 | ||
ARGS: -avz # rsync参数,排除.pyc文件 | ||
SERVER_PORT: ${{ secrets.SSH_PORT }} # SSH端口 | ||
FOLDER: ./dist # 要推送的文件夹,路径相对于代码仓库的根目录 | ||
SERVER_IP: ${{ secrets.SSH_HOST }} # 引用配置,服务器的host名(IP或者域名domain.com) | ||
USERNAME: ${{ secrets.SSH_USER }} # 引用配置,服务器登录名 | ||
SERVER_DESTINATION: /root/project/awesome-study/ # 部署到目标文件夹 | ||
- name: rsync deployments | ||
uses: burnett01/rsync-[email protected] | ||
with: | ||
switches: -avzr --delete | ||
path: ./dist | ||
remote_path: /root/project/awesome-study/ | ||
remote_host: ${{ secrets.SSH_HOST }} | ||
remote_port: ${{ secrets.SSH_PORT }} | ||
remote_user: ${{ secrets.SSH_USER }} | ||
remote_key: ${{ secrets.DEPLOY_KEY }} | ||
|
||
- name: Restart server # 第三步,重启服务 | ||
uses: appleboy/ssh-action@master | ||
|