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_USER: gbuser
|
||||
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
|
||||
run: |
|
||||
cd /opt/gbo/work/generalbots
|
||||
CARGO_BUILD_JOBS=4 cargo build -p botserver --bin botserver
|
||||
- name: Deploy
|
||||
cd /opt/gbo/work/botserver
|
||||
git reset --hard HEAD && git clean -fd
|
||||
git pull
|
||||
git submodule update --init --recursive botlib botserver
|
||||
cargo build -p botserver
|
||||
- name: Deploy to Stage
|
||||
run: |
|
||||
BINARY=/opt/gbo/work/target/debug/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"
|
||||
sleep 10
|
||||
ssh -o StrictHostKeyChecking=no ${SYSTEM_USER}@${SYSTEM_HOST} "curl -sf http://localhost:8080/health && echo 'BotServer Deployed' || echo 'Failed'"
|
||||
sudo incus exec system --project STAGE-GBO -- systemctl stop botserver || true
|
||||
sudo incus exec system --project STAGE-GBO -- pkill -x botserver || true
|
||||
sleep 1
|
||||
sudo incus file push /opt/gbo/work/botserver/target/debug/botserver system/opt/gbo/bin/botserver --project STAGE-GBO --mode=0755
|
||||
sudo incus exec system --project STAGE-GBO -- systemctl start botserver
|
||||
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