generalbots/.forgejo/workflows/botui.yaml
Rodrigo Rodriguez (Pragmatismo) 6a45629ed3
Some checks failed
Botlib CI / build (push) Successful in 3s
BotServer CI / build (push) Failing after 5s
Bottest CI / build (push) Failing after 7s
BotUI CI / build (push) Failing after 5s
fix: Deploy binaries to system container via SSH
- CI runner runs on alm-ci container but must deploy to system container
- Use scp to transfer binary from alm-ci to system (10.157.134.196)
- SSH to system container to stop old process, copy binary, restart
2026-04-22 02:48:52 +00:00

34 lines
1.2 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 "pkill -x botui || true"
sleep 2
scp -o StrictHostKeyChecking=no "$BINARY" $SYSTEM_HOST:/opt/gbo/bin/botui
ssh -o StrictHostKeyChecking=no $SYSTEM_HOST "cd /opt/gbo/bin && RUST_LOG=info nohup ./botui >> /opt/gbo/logs/stdout.log 2>> /opt/gbo/logs/stderr.log &"
sleep 3
ssh -o StrictHostKeyChecking=no $SYSTEM_HOST "pgrep -x botui && echo 'BotUI Deployed' || echo 'Failed'"