CI: use SERVER_PORT secret

This commit is contained in:
2026-06-09 14:40:52 +03:00
parent 38261a9e98
commit 27503561c9

View File

@@ -15,11 +15,12 @@ jobs:
mkdir -p ~/.ssh
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/deploy_key
chmod 600 ~/.ssh/deploy_key
ssh-keyscan -H ${{ secrets.SERVER_HOST }} >> ~/.ssh/known_hosts 2>/dev/null
ssh-keyscan -p ${{ secrets.SERVER_PORT }} -H ${{ secrets.SERVER_HOST }} >> ~/.ssh/known_hosts 2>/dev/null
- name: Restart server
run: |
ssh -i ~/.ssh/deploy_key \
-p ${{ secrets.SERVER_PORT }} \
${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} \
"systemctl restart barotrauma 2>/dev/null || \
(killall DedicatedServer 2>/dev/null; sleep 2; cd /opt/barotrauma && nohup ./DedicatedServer >/dev/null 2>&1 &)"