Skip to content

Commit eea7ce5

Browse files
committed
Try to fix the rsync issue
1 parent 385e8f0 commit eea7ce5

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,21 @@ jobs:
6161
chmod 700 ~/.ssh
6262
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa
6363
chmod 0400 ~/.ssh/id_rsa
64-
64+
65+
# Run rsync twice to see if it solves my issue. I have an issue where rsync is hanging randomly.
66+
# It might be related to the Imunify360 firewall. When this occurs, Imunify seems to be reloading the ipset list.
67+
# I need to investigate further.
6568
- name: Sending data with RSYNC
6669
run: |
67-
rsync -e "ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa" \
70+
sleep 2
71+
rsync --timeout=60 -e "ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa" \
6872
--exclude=".git" -av --delete build/ \
69-
${{ secrets.CPANEL_USERNAME }}@${{ secrets.CPANEL_SERVER }}:/home/${{ secrets.CPANEL_USERNAME }}/public_html
73+
${{ secrets.CPANEL_USERNAME }}@${{ secrets.CPANEL_SERVER }}:/home/${{ secrets.CPANEL_USERNAME }}/public_html || true
74+
sleep 2
75+
rsync --timeout=60 -e "ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa" \
76+
--exclude=".git" -av --delete build/ \
77+
${{ secrets.CPANEL_USERNAME }}@${{ secrets.CPANEL_SERVER }}:/home/${{ secrets.CPANEL_USERNAME }}/public_html
78+
7079
7180
- name: Cleaning SSH keys
7281
if: always()

0 commit comments

Comments
 (0)