Some checks failed
BotServer CI / build (push) Has been cancelled
35 lines
1,002 B
YAML
35 lines
1,002 B
YAML
# v22 - Fast deploy
|
|
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 && git submodule update --init --recursive botlib botserver
|
|
rm -rf .github
|
|
|
|
- name: Build
|
|
run: |
|
|
cd /opt/gbo/work/botserver
|
|
cargo build -p botserver
|
|
ls -lh target/debug/botserver
|
|
|
|
- name: Deploy
|
|
run: |
|
|
B="/opt/gbo/work/botserver/target/debug/botserver"
|
|
[ -f "$B" ] && sudo incus file push "$B" system:/opt/gbo/bin/botserver --mode=0755 && sudo incus exec system -- systemctl restart botserver && echo "✅ Deployed" || echo "❌ Failed"
|