Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
xiajieqiong committed Sep 18, 2023
1 parent a4d7fa8 commit 7742bb6
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7742bb6

Please sign in to comment.