From 72e64ce7b4e397e013d3e1e588039af68bb010c2 Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Sun, 19 Apr 2026 06:24:21 -0300 Subject: [PATCH] CI: New fresh workflow file --- .forgejo/workflows/ci.yaml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .forgejo/workflows/ci.yaml diff --git a/.forgejo/workflows/ci.yaml b/.forgejo/workflows/ci.yaml new file mode 100644 index 0000000..0a452b2 --- /dev/null +++ b/.forgejo/workflows/ci.yaml @@ -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