fix(ci): deploy botui static assets and implement cache busting
Some checks failed
BotServer CI / build (push) Failing after 16s
Some checks failed
BotServer CI / build (push) Failing after 16s
This commit is contained in:
parent
ce81951a69
commit
ec8d002574
1 changed files with 15 additions and 3 deletions
|
|
@ -28,6 +28,7 @@ jobs:
|
|||
git clone --depth 1 --branch main https://alm.pragmatismo.com.br/GeneralBots/gb.git workspace
|
||||
cd workspace
|
||||
git submodule update --init --depth 1 botlib
|
||||
git submodule update --init --depth 1 botui
|
||||
|
||||
# Remove all members except botserver and botlib from workspace
|
||||
sed -i '/"botapp",/d' Cargo.toml
|
||||
|
|
@ -43,8 +44,14 @@ jobs:
|
|||
rm -rf workspace/botserver
|
||||
mv botserver workspace/botserver
|
||||
|
||||
|
||||
|
||||
- name: Cache Busting
|
||||
run: |
|
||||
TS=$(date +%s)
|
||||
cd workspace/botui/ui/suite/chat
|
||||
mv chat.css chat.$TS.css
|
||||
mv chat.js chat.$TS.js
|
||||
sed -i "s/chat.css/chat.$TS.css/g" chat.html
|
||||
sed -i "s/chat.js/chat.$TS.js/g" chat.html
|
||||
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
|
|
@ -65,7 +72,6 @@ jobs:
|
|||
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
|
||||
$HOME/.cargo/bin/sccache --start-server || true
|
||||
|
||||
|
||||
- name: Setup environment
|
||||
run: sudo cp /opt/gbo/bin/system/.env . 2>/dev/null || true
|
||||
|
||||
|
|
@ -87,8 +93,14 @@ jobs:
|
|||
run: |
|
||||
lxc exec bot:pragmatismo-system -- systemctl stop system || true
|
||||
|
||||
# Deploy Binary
|
||||
sudo cp target/debug/botserver /opt/gbo/bin/system/
|
||||
sudo chmod +x /opt/gbo/bin/system/botserver
|
||||
|
||||
# Deploy UI Assets (botui)
|
||||
sudo mkdir -p /opt/gbo/bin/system/botui/ui
|
||||
sudo cp -r botui/ui/suite /opt/gbo/bin/system/botui/ui/
|
||||
sudo cp -r botui/ui/themes /opt/gbo/bin/system/botui/ui/ || true
|
||||
|
||||
lxc exec bot:pragmatismo-system -- systemctl start system || true
|
||||
|
||||
Loading…
Add table
Reference in a new issue