fix(ci): copy botui/ui to botserver/ui before build with embed-ui
Some checks failed
BotUI CI / build (push) Waiting to run
Botlib CI / build (push) Successful in 45s
BotServer CI / build (push) Has been cancelled
Bottest CI / build (push) Successful in 47s

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-04-24 10:01:42 +00:00
parent c960461eb5
commit 76c2318290

View file

@ -26,12 +26,17 @@ jobs:
git clean -fd
git pull
git submodule update --init --recursive
- name: Build with embedded UI
- name: Build botui (to embed UI files)
run: |
CARGO_BUILD_JOBS=4 cargo build -p botserver --bin botserver --features embed-ui
cargo build -p botui --bin botui --release
- name: Build botserver with embedded UI
run: |
# Copy botui/ui to botserver/ui so rust-embed can find it
cp -r botui/ui botserver/ui
CARGO_BUILD_JOBS=4 cargo build -p botserver --bin botserver --features embed-ui --release
- name: Deploy to Stage
run: |
BINARY=/opt/gbo/work/target/debug/botserver
BINARY=/opt/gbo/work/target/release/botserver
ssh -o StrictHostKeyChecking=no ${SYSTEM_USER}@${SYSTEM_HOST} "sudo systemctl stop botserver 2>/dev/null; sudo pkill -x botserver 2>/dev/null; sleep 1"
scp -o StrictHostKeyChecking=no "$BINARY" ${SYSTEM_USER}@${SYSTEM_HOST}:/opt/gbo/bin/botserver-new
ssh -o StrictHostKeyChecking=no ${SYSTEM_USER}@${SYSTEM_HOST} "sudo mv /opt/gbo/bin/botserver-new /opt/gbo/bin/botserver && sudo chmod +x /opt/gbo/bin/botserver && sudo systemctl enable botserver && sudo systemctl start botserver"