diff --git a/.forgejo/workflows/botserver-v2.yaml b/.forgejo/workflows/botserver-v2.yaml index 170133d1..f674f7a4 100644 --- a/.forgejo/workflows/botserver-v2.yaml +++ b/.forgejo/workflows/botserver-v2.yaml @@ -1,6 +1,6 @@ -# HASH-BUSTER-20260418-CONTAINER-v15 -# Dev machine approach: work folder is /opt/gbo/work/ -# Pre-installed: Rust, Node, Python, sccache on runner +# HASH-BUSTER-20260418-CONTAINER-v16 +# Dev machine approach: /opt/gbo/work/botserver +# Pre-installed globally: Rust, Node.js, Python, sccache name: BotServer CI/CD on: @@ -13,6 +13,7 @@ env: SCCACHE_DIR: /opt/gbo/work/.sccache CARGO_TARGET_DIR: /opt/gbo/work/target RUSTC_WRAPPER: sccache + PATH: /home/gbuser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin jobs: build: @@ -21,21 +22,19 @@ jobs: - name: Pull Latest run: | echo "=== Pull Latest ===" - cd /opt/gbo/work - if [ ! -d "gb" ]; then - git clone https://alm.pragmatismo.com.br/GeneralBots/gb.git - fi - cd /opt/gbo/work/gb - git pull --rebase - cd /opt/gbo/work/gb/botserver - git pull --rebase - cd /opt/gbo/work/gb/botlib + cd /opt/gbo/work/botserver git pull --rebase + # Remove .github submodule (causes auth issues) + rm -rf .github + grep -v "github" .gitmodules > .gitmodules.tmp || true + mv .gitmodules.tmp .gitmodules + # Initialize all submodules + git submodule update --init --recursive - name: Build run: | echo "=== Build ===" - cd /opt/gbo/work/gb + cd /opt/gbo/work/botserver cargo build -p botserver cargo build -p botui cargo build -p botlib @@ -45,10 +44,9 @@ jobs: - name: Deploy run: | echo "=== Deploy ===" - BINARY="/opt/gbo/work/gb/target/debug/botserver" + BINARY="/opt/gbo/work/botserver/target/debug/botserver" if [ -f "$BINARY" ]; then echo "Binary exists: $BINARY" - # Copy to system container ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 system@localhost \ "bash -c 'cd /opt/gbo/bin && pkill -f botserver || true; sleep 2'" ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 system@localhost \