fix: host key verification failed
All checks were successful
Build and Deploy Svelte App / build-and-deploy (push) Successful in 1m2s

This commit is contained in:
itsscb 2025-04-09 23:42:50 +02:00
parent c2f587eebf
commit 6ccb37b556

View File

@ -35,8 +35,13 @@ jobs:
- name: Deploy to Strato.de (SFTP example)
run: |
sudo apt-get update # Update package list
sudo apt-get install -y sshpass # Install sshpass
sshpass -p "$DEPLOY_PASSWORD" scp -r build/* "$DEPLOY_USER@$DEPLOY_SERVER:/"
sudo apt-get install -y sshpass # Install sshpass for non-interactive SFTP
echo "putting files to Strato server"
sshpass -p "$DEPLOY_PASSWORD" sftp -o StrictHostKeyChecking=no "$DEPLOY_USER@$DEPLOY_SERVER:/" <<EOF
cd /path/to/your/website # Change to the directory where you want to upload files
put -r build/* # Upload the contents of the build folder
exit # Close the SFTP session
EOF
env:
DEPLOY_PASSWORD: ${{ secrets.STRATO_PASSWORD }} # Add your deployment password to secrets
DEPLOY_USER: ${{ secrets.STRATO_USER }} # Add your deploy username to secrets