fix: Kill botserver before scp deploy to prevent file lock
Some checks failed
BotServer CI / build (push) Failing after 11m22s

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-03-20 18:59:14 -03:00
parent 705d925947
commit 6e54799973

View file

@ -66,6 +66,6 @@ jobs:
- name: Deploy via SSH - name: Deploy via SSH
working-directory: workspace working-directory: workspace
run: | run: |
ssh -o StrictHostKeyChecking=no pragmatismo-system "systemctl stop system.service || true" ssh -o StrictHostKeyChecking=no pragmatismo-system "pkill -f /opt/gbo/bin/botserver || true; sleep 2"
scp -o StrictHostKeyChecking=no target/debug/botserver pragmatismo-system:/opt/gbo/bin/botserver scp -o StrictHostKeyChecking=no target/debug/botserver pragmatismo-system:/opt/gbo/bin/botserver
ssh -o StrictHostKeyChecking=no pragmatismo-system "chmod +x /opt/gbo/bin/botserver && systemctl start system.service" ssh -o StrictHostKeyChecking=no pragmatismo-system "chmod +x /opt/gbo/bin/botserver && cd /opt/gbo/bin && nohup sudo -u gbuser ./botserver --noconsole >> /opt/gbo/logs/error.log 2>&1 &"