generalbots/.forgejo/workflows/botserver.yaml
Rodrigo Rodriguez (Pragmatismo) 2a5332060b
Some checks failed
Botlib CI / build (push) Successful in 3s
BotServer CI / build (push) Failing after 3s
Bottest CI / build (push) Successful in 19s
BotUI CI / build (push) Failing after 1s
fix(ci): Fix YAML indentation and remove hardcoded IPs from workflows
- Proper YAML indentation for env blocks under jobs
- Remove SYSTEM_HOST from env (use repo variable instead)
- Fix botlib path typo
- All 4 workflows: botlib, botserver, bottest, botui
2026-04-22 13:47:23 +00:00

33 lines
1.1 KiB
YAML

name: BotServer CI
on:
push:
branches: [main]
jobs:
build:
runs-on: gbo
env:
CARGO_TARGET_DIR: /opt/gbo/work/target
RUSTC_WRAPPER: ""
PATH: /home/gbuser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
steps:
- name: Setup
run: |
cd /opt/gbo/work/generalbots
git reset --hard HEAD
git clean -fd
git pull
mkdir -p /opt/gbo/work/target
mkdir -p /opt/gbo/bin
- name: Build
run: |
cd /opt/gbo/work/generalbots
CARGO_BUILD_JOBS=4 cargo build -p botserver --bin botserver
- name: Deploy
run: |
BINARY=/opt/gbo/work/target/debug/botserver
ssh -o StrictHostKeyChecking=no $SYSTEM_HOST "sudo systemctl stop botserver"
sleep 2
scp -o StrictHostKeyChecking=no "$BINARY" $SYSTEM_HOST:/opt/gbo/bin/botserver
ssh -o StrictHostKeyChecking=no $SYSTEM_HOST "sudo systemctl start botserver"
sleep 10
ssh -o StrictHostKeyChecking=no $SYSTEM_HOST "curl -sf http://localhost:8080/health && echo 'BotServer Deployed' || echo 'Failed'"