generalbots/botserver/.forgejo/workflows/botserver-v2.yaml
Rodrigo Rodriguez (Pragmatismo) 037db5c381 feat: Major workspace reorganization and documentation update
- Add comprehensive documentation in botbook/ with 12 chapters
- Add botapp/ Tauri desktop application
- Add botdevice/ IoT device support
- Add botlib/ shared library crate
- Add botmodels/ Python ML models service
- Add botplugin/ browser extension
- Add botserver/ reorganized server code
- Add bottemplates/ bot templates
- Add bottest/ integration tests
- Add botui/ web UI server
- Add CI/CD workflows in .forgejo/workflows/
- Add AGENTS.md and PROD.md documentation
- Add dependency management scripts (DEPENDENCIES.sh/ps1)
- Remove legacy src/ structure and migrations
- Clean up temporary and backup files
2026-04-19 08:14:25 -03:00

50 lines
1.5 KiB
YAML

# 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"