- Add shutdown tracing and 15s forced exit to prevent SIGTERM hangs - Fix E0583: remove self-referential mod declarations in bottest integration files - Fix E0599: correct .status() call on Result in performance.rs - Fix botui CI deploy: use systemctl stop/start instead of pkill+nohup - Update PROD.md with DB-driven CI log retrieval method
34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
name: BotUI CI
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
env:
|
|
CARGO_TARGET_DIR: /opt/gbo/work/target
|
|
RUSTC_WRAPPER: ""
|
|
PATH: /home/gbuser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
SYSTEM_HOST: 10.157.134.196
|
|
jobs:
|
|
build:
|
|
runs-on: gbo
|
|
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 botui --bin botui
|
|
- name: Deploy
|
|
run: |
|
|
BINARY=/opt/gbo/work/target/debug/botui
|
|
ssh -o StrictHostKeyChecking=no $SYSTEM_HOST "sudo systemctl stop botui"
|
|
sleep 2
|
|
scp -o StrictHostKeyChecking=no "$BINARY" $SYSTEM_HOST:/opt/gbo/bin/botui
|
|
ssh -o StrictHostKeyChecking=no $SYSTEM_HOST "sudo systemctl start botui"
|
|
sleep 3
|
|
ssh -o StrictHostKeyChecking=no $SYSTEM_HOST "pgrep -x botui && echo 'BotUI Deployed' || echo 'Failed'"
|