Skip to content

Commit

Permalink
test rsync 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadhabibi14 committed Jan 25, 2024
1 parent e9f028c commit 173caf2
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ jobs:

- name: Add known_hosts 🖥️
run: ssh-keyscan -H ${{ secrets.SERVER_IP }} >> ~/.ssh/known_hosts

- name: Upload with rsync 🔁
uses: burnett01/[email protected]
with:
switches: -avzr --delete --exclude=".git" --exclude=".github"
path: ./
remote_path: /bacaku
remote_host: ${{ secrets.SERVER_IP }}
remote_user: ${{ secrets.SERVER_USER }}
remote_key: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
echo "${{ secrets.SSH_PRIVATE_KEY }}" > deploy_key
chmod 600 ./deploy_key
rsync --delete -avz \
--exclude=".git" --exclude=".github" \
-e 'ssh -i ./deploy_key -o StrictHostKeyChecking=no' \
--exclude /deploy_key \
./ ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }}:/bacaku
# Execute command ke VPS
- name: Execute Command ☣️
Expand Down

0 comments on commit 173caf2

Please sign in to comment.