Skip to content

Commit

Permalink
fix: change deploy config workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhongit committed Dec 19, 2024
1 parent 07e12fc commit 0668b2f
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,28 @@ jobs:
- name: Deploy to Remote Host
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USERNAME }}
password: ${{ secrets.REMOTE_PASS }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.REMOTE_PORT }}
host: ${{ secrets.REMOTE_HOST_WEB_2 }}
username: ${{ secrets.REMOTE_USERNAME_WEB_2 }}
password: ${{ secrets.REMOTE_PASS_WEB_2 }}
key: ${{ secrets.SSH_PRIVATE_KEY_WEB_2 }}
port: ${{ secrets.REMOTE_PORT_WEB_2 }}
script: |
source "$HOME/.nvm/nvm.sh"
nvm use ${{ vars.GLOBAL_NVM_USE_VERSION }}
cd ${{ secrets.DOCS_RUNNER_PATH }}
${{ secrets.DOCS_RUNNER_COMMAND }}
sync-build:
runs-on: self-hosted
needs: deploy
steps:
- name: Sync build
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.REMOTE_HOST_WEB_2 }}
username: ${{ secrets.REMOTE_USERNAME_WEB_2 }}
password: ${{ secrets.REMOTE_PASS_WEB_2 }}
key: ${{ secrets.SSH_PRIVATE_KEY_WEB_2 }}
port: ${{ secrets.REMOTE_PORT_WEB_2 }}
script: |
rsync -avz --delete ${{ vars.DOCS_PATH_WEB_2 }}/build/ ${{ vars.NGINX_SERVER_NAME }}:${{ vars.NGINX_SERVER_SYNC_PATH }}/docs/

0 comments on commit 0668b2f

Please sign in to comment.