infra: fix ssh syntax
Some checks failed
Deploy eolas-api / deploy (push) Failing after 38s

This commit is contained in:
Thomas Bishop 2025-10-16 14:50:35 +01:00
parent dcce96e67a
commit 7037b8b501

View file

@ -77,9 +77,9 @@ jobs:
rsync -avz --delete --inplace --exclude='.env' -e "ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no" ./ ${{ vars.VPS_DEPLOY_USER }}:/var/www/eolas-api/ rsync -avz --delete --inplace --exclude='.env' -e "ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no" ./ ${{ vars.VPS_DEPLOY_USER }}:/var/www/eolas-api/
echo "⚡ INFO Run npm install on VPS" echo "⚡ INFO Run npm install on VPS"
ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no ${{vars.VPS_DEPLOY_USER}} "cd /var/www/eolas-api && npm install --omit=dev" ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no ${{vars.VPS_DEPLOY_USER}} "bash -l -c 'cd /var/www/eolas-api && npm install --omit=dev'"
echo "⚡ INFO Restarting service" echo "⚡ INFO Restarting service"
ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no ${{vars.VPS_DEPLOY_USER}} "sudo /usr/bin/systemctl daemon-reload && sudo sudo /usr/bin/systemctl start eolas-api.service" ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no ${{vars.VPS_DEPLOY_USER}} "bash -l -c 'sudo /usr/bin/systemctl daemon-reload && sudo /usr/bin/systemctl start eolas-api.service'"
rm /tmp/ssh_key rm /tmp/ssh_key