# 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: push: branches: [main] pull_request: branches: [main] 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: runs-on: gbo steps: - name: Pull Latest run: | echo "=== Pull Latest ===" 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/botserver cargo build -p botserver cargo build -p botui cargo build -p botlib ls -lh target/debug/botserver ls -lh target/debug/botui - name: Deploy run: | echo "=== Deploy ===" BINARY="/opt/gbo/work/botserver/target/debug/botserver" if [ -f "$BINARY" ]; then echo "Binary exists: $BINARY" 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 \ "bash -c 'cp $BINARY /opt/gbo/bin/botserver && systemctl restart botserver'" echo "Deploy completed" else echo "ERROR: Binary not found at $BINARY" exit 1 fi