Skip to content

Commit e107112

Browse files
committed
Fix PM2 ecosystem file name
1 parent 2b15c8f commit e107112

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -178,22 +178,13 @@ jobs:
178178
pm2 jlist 2>/dev/null | grep -q "\"name\":\"$1\""
179179
}
180180
181-
# Handle backend process
181+
# Restart both frontend and backend via config file
182182
if process_exists "${BACKEND_NAME}"; then
183183
echo "♻️ Restarting ${BACKEND_NAME}..."
184-
pm2 restart "${BACKEND_NAME}"
184+
pm2 restart ${CONFIG_FILE}
185185
else
186186
echo "🚀 Starting ${BACKEND_NAME}..."
187-
pm2 start ${CONFIG_FILE} --only "${BACKEND_NAME}"
188-
fi
189-
190-
# Handle frontend process
191-
if process_exists "${FRONTEND_NAME}"; then
192-
echo "♻️ Restarting \${FRONTEND_NAME}..."
193-
pm2 restart "\${FRONTEND_NAME}"
194-
else
195-
echo "🚀 Starting \${FRONTEND_NAME}..."
196-
pm2 start \${CONFIG_FILE} --only "\${FRONTEND_NAME}"
187+
pm2 start ${CONFIG_FILE}
197188
fi
198189
199190
pm2 save

0 commit comments

Comments
 (0)