CI: Move workflow to root .forgejo/workflows/

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-04-18 20:53:35 -03:00
parent 27c19def7d
commit 4042763344
4 changed files with 53 additions and 3 deletions

View file

@ -0,0 +1,50 @@
# v26 - Clean submodule state
name: BotServer CI
on:
push:
branches: [main]
env:
SCCACHE_DIR: /opt/gbo/work/.sccache
CARGO_TARGET_DIR: /opt/gbo/work/target
RUSTC_WRAPPER: sccache
PATH: /home/gbuser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
jobs:
build:
runs-on: gbo
steps:
- name: Setup
run: |
cd /opt/gbo/work/botserver
git rebase --abort 2>/dev/null || true
git reset --hard HEAD
git clean -fd
git pull
# CRITICAL: Reset submodules to clean state
git submodule foreach --recursive git reset --hard HEAD 2>/dev/null || true
git submodule foreach --recursive git clean -fd 2>/dev/null || true
git submodule update --init --recursive botlib botserver
# Verify clean
echo "Submodule status:"
git submodule status | head -5
- name: Build
run: |
cd /opt/gbo/work/botserver
cargo build -p botserver
- name: Deploy
run: |
echo "1. Kill old..."
timeout 5 bash -c 'while pgrep -x botserver > /dev/null; do pkill -x botserver; sleep 0.5; done' || true
echo "2. Copy..."
mkdir -p /opt/gbo/bin
cp -f /opt/gbo/work/botserver/target/debug/botserver /opt/gbo/bin/
chmod +x /opt/gbo/bin/botserver
echo "3. Start..."
cd /opt/gbo/bin && ./botserver --noconsole &
sleep 3
echo "4. Verify..."
pgrep -x botserver && echo "✅ Running" || echo "❌ Failed"

@ -1 +1 @@
Subproject commit 9b1990baf18983f75b56c8414d33f577b193c962
Subproject commit 4518bf7bd1c4ae6fafd5c42fa5f4515a383b480a

@ -1 +1 @@
Subproject commit 29a87e369452fe6655bac438715cb80f4f942519
Subproject commit fed92acaab8a4c9c9a32aa39db5b4a2bf11daeda

2
botui

@ -1 +1 @@
Subproject commit 30ae3e02ddd22f20f3b03fdc1a545a56b7f4e19e
Subproject commit d49eeab1c54bc8a51db249814d2476f7eabdd851