We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df33f42 commit 35507aeCopy full SHA for 35507ae
.github/workflows/deploy.yml
@@ -36,16 +36,17 @@ jobs:
36
source .venv/bin/activate
37
38
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'
+ BOT_PID=$(pgrep -f 'python main.py')
+ if [ -n "$BOT_PID" ]; then
+ echo "Stopping existing bot process (PID: $BOT_PID)"
42
+ kill -TERM $BOT_PID
43
else
44
echo "No existing bot process found"
45
fi
46
47
echo "Starting bot"
- python main.py &
48
+ nohup python main.py &
49
50
echo "Workflow completed"
51
script_stop: true
- timeout: 60s
52
+ timeout: 60s
0 commit comments