From 76c23182906ea43eac95d0c20b8d8a5ed95b3059 Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Fri, 24 Apr 2026 10:01:42 +0000 Subject: [PATCH] fix(ci): copy botui/ui to botserver/ui before build with embed-ui --- .forgejo/workflows/botserver.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/botserver.yaml b/.forgejo/workflows/botserver.yaml index 1da23b91..058469c8 100644 --- a/.forgejo/workflows/botserver.yaml +++ b/.forgejo/workflows/botserver.yaml @@ -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"