From 46e5d16892930aa23cb2e33b8cda3d3aa873bf10 Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Sat, 18 Apr 2026 20:41:47 -0300 Subject: [PATCH] CI: v23 - Simple deploy: pkill, cp, start --- .forgejo/workflows/botserver-v2.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/botserver-v2.yaml b/.forgejo/workflows/botserver-v2.yaml index 50d6c9d0..96d6cf17 100644 --- a/.forgejo/workflows/botserver-v2.yaml +++ b/.forgejo/workflows/botserver-v2.yaml @@ -1,4 +1,4 @@ -# v22 - Fast deploy +# v23 - Simple deploy: stop, copy, start name: BotServer CI on: @@ -21,15 +21,17 @@ jobs: git rebase --abort 2>/dev/null || true git reset --hard HEAD && git clean -fd git pull && git submodule update --init --recursive botlib botserver - rm -rf .github - name: Build run: | cd /opt/gbo/work/botserver cargo build -p botserver - ls -lh target/debug/botserver - name: Deploy run: | - B="/opt/gbo/work/botserver/target/debug/botserver" - [ -f "$B" ] && sudo incus file push "$B" system:/opt/gbo/bin/botserver --mode=0755 && sudo incus exec system -- systemctl restart botserver && echo "✅ Deployed" || echo "❌ Failed" + sudo pkill -f botserver || true + sleep 1 + cp /opt/gbo/work/botserver/target/debug/botserver /opt/gbo/bin/botserver + cd /opt/gbo/bin && RUST_LOG=info nohup ./botserver --noconsole > /opt/gbo/logs/stdout.log 2>&1 & + sleep 2 + pgrep -f botserver && echo "✅ Running" || echo "❌ Failed"