Skip to content

Commit 35507ae

Browse files
committed
🤹‍♂️ still trying to fix deploy
1 parent df33f42 commit 35507ae

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/deploy.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,17 @@ jobs:
3636
source .venv/bin/activate
3737
3838
echo "Checking for existing bot process"
39-
if pgrep -f 'python main.py'; then
40-
echo "Stopping existing bot process"
41-
pkill -f 'python main.py'
39+
BOT_PID=$(pgrep -f 'python main.py')
40+
if [ -n "$BOT_PID" ]; then
41+
echo "Stopping existing bot process (PID: $BOT_PID)"
42+
kill -TERM $BOT_PID
4243
else
4344
echo "No existing bot process found"
4445
fi
4546
4647
echo "Starting bot"
47-
python main.py &
48+
nohup python main.py &
4849
4950
echo "Workflow completed"
5051
script_stop: true
51-
timeout: 60s
52+
timeout: 60s

0 commit comments

Comments
 (0)