mirror of
https://github.com/NetworkCats/rustyip.git
synced 2026-11-13 16:17:46 +00:00
fix: prevent ssh-keyscan non-zero exit from aborting deploy under bash -e
This commit is contained in:
@@ -75,7 +75,7 @@ jobs:
|
||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/deploy_key
|
||||
chmod 600 ~/.ssh/deploy_key
|
||||
for i in 1 2 3; do
|
||||
keys=$(ssh-keyscan -H "${{ steps.vps.outputs.ip }}" 2>/dev/null)
|
||||
keys=$(ssh-keyscan -H "${{ steps.vps.outputs.ip }}" 2>/dev/null) || true
|
||||
if [ -n "$keys" ]; then
|
||||
echo "$keys" >> ~/.ssh/known_hosts
|
||||
echo "ssh-keyscan succeeded on attempt $i"
|
||||
|
||||
Reference in New Issue
Block a user