CI: New fresh workflow file

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-04-19 06:24:21 -03:00
parent 3f5e8eee1c
commit 72e64ce7b4

View file

@ -0,0 +1,34 @@
# NEW WORKFLOW - Fresh start
name: BotServer CI
on:
push:
branches: [main]
env:
PATH: /home/gbuser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
jobs:
deploy:
runs-on: gbo
steps:
- name: Deploy
run: |
echo "Starting deploy..."
# Kill old
timeout 3 bash -c 'while pgrep -x botserver > /dev/null; do pkill -x botserver; sleep 0.3; done' || true
sleep 1
# Copy
cp -f /opt/gbo/work/botserver/target/debug/botserver /opt/gbo/bin/botserver 2>/dev/null || echo "Binary not found, skipping copy"
chmod +x /opt/gbo/bin/botserver
# Start
cd /opt/gbo/bin && ./botserver --noconsole &
sleep 2
# Verify
if pgrep -x botserver > /dev/null 2>&1; then
echo "✅ SUCCESS"
pgrep -x botserver
else
echo "❌ FAILED"
exit 1
fi