File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -71,17 +71,19 @@ jobs:
7171 key : ${{ secrets.SSH_PRIVATE_KEY }}
7272 port : 22
7373 script : |
74- cd /usr/local/bin && pm2 restart test_server # <-- Use full path here!
74+ export PATH=$PATH:/usr/local/bin
75+ pm2 restart test_server
7576
76- - name : Check PM2 logs
77+ - name : Check PM2 logs (safe and short)
77787879 with :
7980 host : ${{ secrets.SERVER_IP }}
8081 username : ${{ secrets.SERVER_USER }}
8182 key : ${{ secrets.SSH_PRIVATE_KEY }}
8283 port : 22
8384 script : |
84- cd /usr/local/bin && pm2 logs test_server # <-- Use full path here!
85+ export PATH=$PATH:/usr/local/bin
86+ pm2 logs test_server --lines 20 --nostream
8587
8688 - name : Check PM2 status
87899193 key : ${{ secrets.SSH_PRIVATE_KEY }}
9294 port : 22
9395 script : |
94- cd /usr/local/bin && pm2 status test_server # <-- Use full path here!
96+ export PATH=$PATH:/usr/local/bin
97+ pm2 status test_server
9598
9699 - name : Check if the server is running
97100@@ -101,4 +104,4 @@ jobs:
101104 key : ${{ secrets.SSH_PRIVATE_KEY }}
102105 port : 22
103106 script : |
104- curl -I http://localhost:3000
107+ curl -I http://localhost:3000 || exit 1
You can’t perform that action at this time.
0 commit comments