Skip to content

Commit

Permalink
Use SSH_KEY_FILE_DIR in rsync command instead of directly
Browse files Browse the repository at this point in the history
  • Loading branch information
hoang-rio committed Jan 5, 2024
1 parent 3b69ae1 commit b98f439
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
- name: Deploy to Main Server
run: |
rsync -have "ssh -i ${{env.SSH_KEY_FILE_PATH}} -o StrictHostKeyChecking=no" --exclude=".keys" --exclude=".git" --exclude=".github" . ${{secrets.SSH_DEPLOY_USER}}@${{secrets.SSH_MAIN_HOST}}:${{secrets.DEPLOY_PATH}}
rsync -have "ssh -i ${{env.SSH_KEY_FILE_PATH}} -o StrictHostKeyChecking=no" --exclude="${{env.SSH_KEY_FILE_DIR}}" --exclude=".git" --exclude=".github" . ${{secrets.SSH_DEPLOY_USER}}@${{secrets.SSH_MAIN_HOST}}:${{secrets.DEPLOY_PATH}}
- name: Deploy to backup Server
run: |
rsync -have "ssh -i ${{env.SSH_KEY_FILE_PATH}} -o StrictHostKeyChecking=no" --exclude=".keys" --exclude=".git" --exclude=".github" . ${{secrets.SSH_DEPLOY_USER}}@${{secrets.SSH_BACKUP_HOST}}:${{secrets.DEPLOY_PATH}}
rsync -have "ssh -i ${{env.SSH_KEY_FILE_PATH}} -o StrictHostKeyChecking=no" --exclude="${{env.SSH_KEY_FILE_DIR}}" --exclude=".git" --exclude=".github" . ${{secrets.SSH_DEPLOY_USER}}@${{secrets.SSH_BACKUP_HOST}}:${{secrets.DEPLOY_PATH}}
- name: Clean deply key file
run: |
Expand Down

0 comments on commit b98f439

Please sign in to comment.