CI: Clean workflows - root only
This commit is contained in:
parent
5230b7d889
commit
2c66e30e66
1 changed files with 30 additions and 0 deletions
30
.forgejo/workflows/botserver.yaml
Normal file
30
.forgejo/workflows/botserver.yaml
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
name: BotServer CI
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'botserver/**'
|
||||
- 'botlib/**'
|
||||
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
|
||||
- name: Build
|
||||
run: |
|
||||
cd /opt/gbo/work/botserver
|
||||
cargo build -p botserver
|
||||
- name: Deploy
|
||||
run: |
|
||||
sudo incus exec system -- systemctl stop botserver || true
|
||||
sudo incus exec system -- pkill -x botserver || true
|
||||
sleep 1
|
||||
sudo incus file push /opt/gbo/work/botserver/target/debug/botserver system:/opt/gbo/bin/botserver --mode=0755
|
||||
sudo incus exec system -- systemctl start botserver
|
||||
sleep 2
|
||||
sudo incus exec system -- pgrep -x botserver && echo "✅ Deployed" || echo "❌ Failed"
|
||||
Loading…
Add table
Reference in a new issue