Skip to content

Commit

Permalink
fix: optimize ssh connect in the workflow
Browse files Browse the repository at this point in the history
reduces the overhead of an additional SSH connection.
  • Loading branch information
tanhongit committed Dec 19, 2024
1 parent bd45c95 commit c4c370e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,4 @@ jobs:
key: ${{ secrets.SSH_PRIVATE_KEY_WEB_2 }}
port: ${{ secrets.REMOTE_PORT_WEB_2 }}
script: |
ssh ${{ vars.NGINX_SERVER_NAME }} "mkdir -p ${{ vars.NGINX_SERVER_DOCS_PATH }}"
rsync -avz --delete ${{ vars.DOCS_PATH_WEB_2 }}/build/ ${{ vars.NGINX_SERVER_NAME }}:${{ vars.NGINX_SERVER_DOCS_PATH }}
rsync -avz --delete -e "ssh ${{ secrets.NGINX_SERVER_NAME }}" ${{ vars.DOCS_PATH_WEB_2 }}/build/ ${{ vars.NGINX_SERVER_NAME }}:${{ vars.NGINX_SERVER_DOCS_PATH }}

0 comments on commit c4c370e

Please sign in to comment.