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"