harden ssh key handling in deploy
Some checks failed
Deploy to my-vpn / deploy (push) Failing after 5s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-02-06 00:21:28 +03:00
parent 3e8f611cd3
commit a80330622e

View File

@@ -17,8 +17,8 @@ jobs:
run: |
mkdir -p ~/.ssh
chmod 700 ~/.ssh
echo "$VPN_SSH_KEY" > ~/.ssh/id_ci_runner
printf '%s\n' "$VPN_SSH_KEY" > ~/.ssh/id_ci_runner
chmod 600 ~/.ssh/id_ci_runner
ssh-keyscan -H "$VPN_HOST" >> ~/.ssh/known_hosts
ssh -i ~/.ssh/id_ci_runner "$VPN_USER@$VPN_HOST" "cd /srv/ip-ua && git fetch --all && git reset --hard origin/main && bash deploy/my-vpn/deploy.sh"
ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ~/.ssh/id_ci_runner "$VPN_USER@$VPN_HOST" "cd /srv/ip-ua && git fetch --all && git reset --hard origin/main && bash deploy/my-vpn/deploy.sh"