From ec8d0025742f9240ec4c60c27d9873e48871d5f3 Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Fri, 20 Feb 2026 20:36:30 -0300 Subject: [PATCH] fix(ci): deploy botui static assets and implement cache busting --- .forgejo/workflows/botserver.yaml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/botserver.yaml b/.forgejo/workflows/botserver.yaml index 36770af..f6f15d3 100644 --- a/.forgejo/workflows/botserver.yaml +++ b/.forgejo/workflows/botserver.yaml @@ -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 \ No newline at end of file