From ff4bc0f3de2d9e0d94bfe57d8351c697ed76af78 Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Wed, 22 Apr 2026 21:30:26 -0300 Subject: [PATCH] fix(stage): fix message type collision and switcher logic in chat ui --- .forgejo/workflows/botserver.yaml | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/.forgejo/workflows/botserver.yaml b/.forgejo/workflows/botserver.yaml index 745076ae..57a0c924 100644 --- a/.forgejo/workflows/botserver.yaml +++ b/.forgejo/workflows/botserver.yaml @@ -12,23 +12,19 @@ jobs: SYSTEM_HOST: ${{ vars.SYSTEM_HOST }} SYSTEM_USER: gbuser steps: - - name: Setup - run: | - cd /opt/gbo/work/generalbots - git reset --hard HEAD - git clean -fd - git pull - mkdir -p /opt/gbo/work/target - mkdir -p /opt/gbo/bin - name: Build run: | - cd /opt/gbo/work/generalbots - CARGO_BUILD_JOBS=4 cargo build -p botserver --bin botserver - - name: Deploy + cd /opt/gbo/work/botserver + git reset --hard HEAD && git clean -fd + git pull + git submodule update --init --recursive botlib botserver + cargo build -p botserver + - name: Deploy to Stage run: | - BINARY=/opt/gbo/work/target/debug/botserver - ssh -o StrictHostKeyChecking=no ${SYSTEM_USER}@${SYSTEM_HOST} "sudo systemctl stop botserver 2>/dev/null; sudo pkill -x botserver 2>/dev/null; sleep 1" - scp -o StrictHostKeyChecking=no "$BINARY" ${SYSTEM_USER}@${SYSTEM_HOST}:/opt/gbo/bin/botserver-new - ssh -o StrictHostKeyChecking=no ${SYSTEM_USER}@${SYSTEM_HOST} "sudo mv /opt/gbo/bin/botserver-new /opt/gbo/bin/botserver && sudo chmod +x /opt/gbo/bin/botserver && sudo systemctl enable botserver && sudo systemctl start botserver" - sleep 10 - ssh -o StrictHostKeyChecking=no ${SYSTEM_USER}@${SYSTEM_HOST} "curl -sf http://localhost:8080/health && echo 'BotServer Deployed' || echo 'Failed'" + sudo incus exec system --project STAGE-GBO -- systemctl stop botserver || true + sudo incus exec system --project STAGE-GBO -- pkill -x botserver || true + sleep 1 + sudo incus file push /opt/gbo/work/botserver/target/debug/botserver system/opt/gbo/bin/botserver --project STAGE-GBO --mode=0755 + sudo incus exec system --project STAGE-GBO -- systemctl start botserver + sleep 2 + sudo incus exec system --project STAGE-GBO -- pgrep -x botserver && echo "BotServer Deployed to Stage" || echo "Failed"