Skip to content

Commit 4634d4a

Browse files
committed
Use rsync instead
1 parent bc5f781 commit 4634d4a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/documentation.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ jobs:
3535
SFTP_HOST: ${{ secrets.SFTP_HOST }}
3636
SFTP_USERNAME: ${{ secrets.SFTP_USERNAME }}
3737
SFTP_KEY: ${{ secrets.SFTP_KEY }}
38+
SFTP_KNOWN_HOSTS: ${{secrets.SFTP_KNOWN_HOSTS}}
3839
run: |
3940
echo "$SFTP_KEY" > sftp_key
4041
chmod 600 sftp_key
41-
scp -i sftp_key -r ./dist $SFTP_USERNAME@$SFTP_HOST:/var/www/www.setonix
42+
echo "$SFTP_KNOWN_HOSTS" > known_hosts
43+
chmod 600 known_hosts
44+
rsync -avz --delete -e "ssh -i sftp_key -o UserKnownHostsFile=known_hosts" dist/ $SFTP_USERNAME@$SFTP_HOST:/path/to/your/website

0 commit comments

Comments
 (0)