fix(stage): fix message type collision and switcher logic in chat ui
This commit is contained in:
parent
42c22cfcab
commit
ff4bc0f3de
1 changed files with 13 additions and 17 deletions
|
|
@ -12,23 +12,19 @@ jobs:
|
||||||
SYSTEM_HOST: ${{ vars.SYSTEM_HOST }}
|
SYSTEM_HOST: ${{ vars.SYSTEM_HOST }}
|
||||||
SYSTEM_USER: gbuser
|
SYSTEM_USER: gbuser
|
||||||
steps:
|
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
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
cd /opt/gbo/work/generalbots
|
cd /opt/gbo/work/botserver
|
||||||
CARGO_BUILD_JOBS=4 cargo build -p botserver --bin botserver
|
git reset --hard HEAD && git clean -fd
|
||||||
- name: Deploy
|
git pull
|
||||||
|
git submodule update --init --recursive botlib botserver
|
||||||
|
cargo build -p botserver
|
||||||
|
- name: Deploy to Stage
|
||||||
run: |
|
run: |
|
||||||
BINARY=/opt/gbo/work/target/debug/botserver
|
sudo incus exec system --project STAGE-GBO -- systemctl stop botserver || true
|
||||||
ssh -o StrictHostKeyChecking=no ${SYSTEM_USER}@${SYSTEM_HOST} "sudo systemctl stop botserver 2>/dev/null; sudo pkill -x botserver 2>/dev/null; sleep 1"
|
sudo incus exec system --project STAGE-GBO -- pkill -x botserver || true
|
||||||
scp -o StrictHostKeyChecking=no "$BINARY" ${SYSTEM_USER}@${SYSTEM_HOST}:/opt/gbo/bin/botserver-new
|
sleep 1
|
||||||
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"
|
sudo incus file push /opt/gbo/work/botserver/target/debug/botserver system/opt/gbo/bin/botserver --project STAGE-GBO --mode=0755
|
||||||
sleep 10
|
sudo incus exec system --project STAGE-GBO -- systemctl start botserver
|
||||||
ssh -o StrictHostKeyChecking=no ${SYSTEM_USER}@${SYSTEM_HOST} "curl -sf http://localhost:8080/health && echo 'BotServer Deployed' || echo 'Failed'"
|
sleep 2
|
||||||
|
sudo incus exec system --project STAGE-GBO -- pgrep -x botserver && echo "BotServer Deployed to Stage" || echo "Failed"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue