- Fix all workflows to use /opt/gbo/work/generalbots (monorepo) - Add proper env vars (SCCACHE, CARGO_TARGET_DIR, PATH) to all workflows - Add deploy steps for botui (with process restart) - Remove broken workflows for non-Rust packages (botapp, botbook, botdevice, botmodels, botplugin) - Add botlib test workflow
36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
name: BotUI CI
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'botui/**'
|
|
- 'botlib/**'
|
|
- '.forgejo/workflows/botui.yaml'
|
|
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: Setup
|
|
run: |
|
|
cd /opt/gbo/work/generalbots
|
|
git reset --hard HEAD
|
|
git clean -fd
|
|
git pull
|
|
- name: Build
|
|
run: |
|
|
cd /opt/gbo/work/generalbots
|
|
cargo build -p botui --bin botui
|
|
- name: Deploy
|
|
run: |
|
|
timeout 5 bash -c 'while pgrep -x botui > /dev/null; do pkill -x botui; sleep 0.5; done' || true
|
|
mkdir -p /opt/gbo/bin
|
|
cp -f /opt/gbo/work/generalbots/target/debug/botui /opt/gbo/bin/
|
|
chmod +x /opt/gbo/bin/botui
|
|
cd /opt/gbo/bin && RUST_LOG=info nohup ./botui --noconsole >> /opt/gbo/logs/stdout.log 2>> /opt/gbo/logs/stderr.log &
|
|
sleep 3
|
|
pgrep -x botui && echo "BotUI Deployed" || echo "Failed"
|