CI: v26 - Reset submodules to clean state
Some checks failed
BotServer CI / build (push) Failing after 4s
Some checks failed
BotServer CI / build (push) Failing after 4s
This commit is contained in:
parent
c218556a94
commit
2ff68e5a2a
1 changed files with 15 additions and 17 deletions
|
|
@ -1,4 +1,4 @@
|
|||
# v25 - Deploy: fixed pkill, correct paths
|
||||
# v26 - Clean submodule state
|
||||
name: BotServer CI
|
||||
|
||||
on:
|
||||
|
|
@ -19,34 +19,32 @@ jobs:
|
|||
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
|
||||
git reset --hard HEAD
|
||||
git clean -fd
|
||||
git pull
|
||||
# CRITICAL: Reset submodules to clean state
|
||||
git submodule foreach --recursive git reset --hard HEAD 2>/dev/null || true
|
||||
git submodule foreach --recursive git clean -fd 2>/dev/null || true
|
||||
git submodule update --init --recursive botlib botserver
|
||||
# Verify clean
|
||||
echo "Submodule status:"
|
||||
git submodule status | head -5
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd /opt/gbo/work/botserver
|
||||
cargo build -p botserver
|
||||
ls -lh target/debug/botserver
|
||||
|
||||
- name: Deploy
|
||||
run: |
|
||||
echo "1. Kill old..."
|
||||
timeout 5 bash -c 'while pgrep -x botserver > /dev/null; do pkill -x botserver; sleep 0.5; done' || true
|
||||
|
||||
echo "2. Copy binary..."
|
||||
echo "2. Copy..."
|
||||
mkdir -p /opt/gbo/bin
|
||||
cp -f /opt/gbo/work/botserver/target/debug/botserver /opt/gbo/bin/
|
||||
chmod +x /opt/gbo/bin/botserver
|
||||
|
||||
echo "3. Start new..."
|
||||
cd /opt/gbo/bin
|
||||
./botserver --noconsole &
|
||||
echo "3. Start..."
|
||||
cd /opt/gbo/bin && ./botserver --noconsole &
|
||||
sleep 3
|
||||
|
||||
echo "4. Verify..."
|
||||
if pgrep -x botserver > /dev/null 2>&1; then
|
||||
echo "✅ Running: $(pgrep -x botserver)"
|
||||
else
|
||||
echo "❌ Not running"
|
||||
exit 1
|
||||
fi
|
||||
pgrep -x botserver && echo "✅ Running" || echo "❌ Failed"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue