From a413cbd37ecac718482aa8392f309b041ac78248 Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Sun, 19 Apr 2026 06:27:58 -0300 Subject: [PATCH] CI: Stop, copy, start on system container --- .forgejo/workflows/ci.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.forgejo/workflows/ci.yaml b/.forgejo/workflows/ci.yaml index 3183b0c..63ff351 100644 --- a/.forgejo/workflows/ci.yaml +++ b/.forgejo/workflows/ci.yaml @@ -24,21 +24,21 @@ jobs: run: | cd /opt/gbo/work/botserver cargo build -p botserver - ls -lh target/debug/botserver - name: Deploy run: | BINARY="/opt/gbo/work/botserver/target/debug/botserver" - echo "Deploying from: $BINARY" + echo "1. Stop old on system..." + sudo incus exec system -- systemctl stop botserver || true + sudo incus exec system -- pkill -x botserver || true + sleep 1 - # Push binary to system container + echo "2. Copy new binary..." sudo incus file push "$BINARY" system:/opt/gbo/bin/botserver --mode=0755 - echo "✅ Copied to system container" - # Restart botserver on system container - sudo incus exec system -- systemctl restart botserver - echo "✅ Restarted on system" - - # Verify + echo "3. Start new on system..." + sudo incus exec system -- systemctl start botserver sleep 2 - sudo incus exec system -- pgrep -x botserver && echo "✅ Running on system!" || echo "❌ Not running" + + echo "4. Verify..." + sudo incus exec system -- pgrep -x botserver && echo "✅ SUCCESS" || echo "❌ FAILED"