fix(ci): copy botui/ui to botserver/ui before build with embed-ui
This commit is contained in:
parent
c960461eb5
commit
76c2318290
1 changed files with 8 additions and 3 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue