Skip to content

Commit d731967

Browse files
committed
Debug PM2 variable handling
1 parent e420e00 commit d731967

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,19 +170,17 @@ jobs:
170170
fi
171171
172172
CONFIG_FILE="ecosystem.staging.config.js"
173-
echo "config file set: \${CONFIG_FILE}"
174173
BACKEND_NAME="${{ secrets.PM2_BACKEND_NAME }}"
175-
echo "backend name set: \${BACKEND_NAME}"
176174
FRONTEND_NAME="${{ secrets.PM2_FRONTEND_NAME }}"
177-
echo "frontend name set: \${FRONTEND_NAME}"
178175
179176
# Function to check if a PM2 process exists
180177
process_exists() {
181178
pm2 jlist 2>/dev/null | grep -q "\"name\":\"\\$1\""
182179
}
183180
184181
# Handle backend process
185-
if process_exists "\${BACKEND_NAME}"; then
182+
#if process_exists "\${BACKEND_NAME}"; then
183+
if process_exists "codeframe-staging-backend"; then
186184
echo "♻️ Restarting \${BACKEND_NAME}..."
187185
pm2 restart "\${BACKEND_NAME}"
188186
else

0 commit comments

Comments
 (0)