CI: Stop, copy, start on system container
This commit is contained in:
parent
54e1069ce0
commit
a413cbd37e
1 changed files with 10 additions and 10 deletions
|
|
@ -24,21 +24,21 @@ jobs:
|
|||
run: |
|
||||
cd /opt/gbo/work/botserver
|
||||
cargo build -p botserver
|
||||
ls -lh target/debug/botserver
|
||||
|
||||
- name: Deploy
|
||||
run: |
|
||||
BINARY="/opt/gbo/work/botserver/target/debug/botserver"
|
||||
echo "Deploying from: $BINARY"
|
||||
echo "1. Stop old on system..."
|
||||
sudo incus exec system -- systemctl stop botserver || true
|
||||
sudo incus exec system -- pkill -x botserver || true
|
||||
sleep 1
|
||||
|
||||
# Push binary to system container
|
||||
echo "2. Copy new binary..."
|
||||
sudo incus file push "$BINARY" system:/opt/gbo/bin/botserver --mode=0755
|
||||
echo "✅ Copied to system container"
|
||||
|
||||
# Restart botserver on system container
|
||||
sudo incus exec system -- systemctl restart botserver
|
||||
echo "✅ Restarted on system"
|
||||
|
||||
# Verify
|
||||
echo "3. Start new on system..."
|
||||
sudo incus exec system -- systemctl start botserver
|
||||
sleep 2
|
||||
sudo incus exec system -- pgrep -x botserver && echo "✅ Running on system!" || echo "❌ Not running"
|
||||
|
||||
echo "4. Verify..."
|
||||
sudo incus exec system -- pgrep -x botserver && echo "✅ SUCCESS" || echo "❌ FAILED"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue