Skip to content

Commit 039c8c8

Browse files
committed
Fix deploy
1 parent 7ab40d0 commit 039c8c8

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

.github/workflows/deploy-example.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,23 @@ jobs:
4949
rm -rf datex.zip
5050
- name: Run datex process in background
5151
run: |
52-
RUNNER_TRACKING_ID=""
53-
ps -ef | grep '[d]atex' | awk '{print $2}' | xargs -r kill -9
54-
[ -f ./datex.log ] && rm ./datex.log
55-
RUNNER_TRACKING_ID="" && nohup ./datex-bin/datex repl -v --config example-config.dx > ./datex.log 2>&1 &
52+
echo "Killing any existing datex processes..."
53+
pids=$(ps -ef | grep '[d]atex' | awk '{print $2}')
54+
if [ -n "$pids" ]; then
55+
kill -9 $pids
56+
fi
57+
58+
echo "Cleaning up old logs..."
59+
[ -f ./datex.log ] && rm ./datex.log
60+
61+
echo "Starting datex in background..."
62+
nohup env RUNNER_TRACKING_ID="" ./datex-bin/datex repl -v --config example-config.dx > ./datex.log 2>&1 &
63+
64+
sleep 2
65+
if ! pgrep -f "./datex-bin/datex repl" > /dev/null; then
66+
echo "❌ datex did not start. Check ./datex.log for details."
67+
cat ./datex.log
68+
exit 1
69+
fi
70+
71+
echo "✅ datex started successfully"

0 commit comments

Comments
 (0)