Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bc9ec08

Browse files
Update deploy.yml
1 parent b75de55 commit bc9ec08

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

‎.github/workflows/deploy.yml‎

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@ jobs:
2828
hugo -D --minify
2929
3030
- name: Deploy to Server # 第四步,rsync推文件
31-
uses: AEnterprise/rsync-deploy@v1.0 # 使用别人包装好的步骤镜像
32-
env:
33-
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} # 引用配置,SSH私钥
34-
ARGS: -avz --delete --exclude='*.pyc' # rsync参数,排除.pyc文件
35-
SERVER_PORT: '22' # SSH端口
36-
FOLDER: ./website/public/* #推送的文件夹,路径相对于代码仓库的根目录
37-
SERVER_IP: ${{ secrets.SSH_HOST }} # 引用配置,服务器的host名(IP或者域名domain.com)
38-
USERNAME: ${{ secrets.SSH_USERNAME }} # 引用配置,服务器登录名
39-
SERVER_DESTINATION: /var/www/books/leetcode/ # 部署到目标文件夹
31+
uses: appleboy/ssh-action@v0.1.3 # 使用别人包装好的步骤镜像
32+
with:
33+
host: ${{ secrets.SSH_HOST }}
34+
username: ${{ secrets.SSH_USERNAME }}
35+
key: ${{ secrets.DEPLOY_KEY }}
36+
port: ${{ secrets.SERVER_PORT }}
37+
script: |
38+
rsync -avz --delete --exclude='*.pyc' ./website/public/ ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }}:${{ secrets.SERVER_DESTINATION }}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /