Skip to content

Commit 2b15c8f

Browse files
committed
Fix over-encoding of PM2 variables
1 parent d731967 commit 2b15c8f

1 file changed

Lines changed: 14 additions & 15 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -175,21 +175,20 @@ jobs:
175175
176176
# Function to check if a PM2 process exists
177177
process_exists() {
178-
pm2 jlist 2>/dev/null | grep -q "\"name\":\"\\$1\""
178+
pm2 jlist 2>/dev/null | grep -q "\"name\":\"$1\""
179179
}
180180
181181
# Handle backend process
182-
#if process_exists "\${BACKEND_NAME}"; then
183-
if process_exists "codeframe-staging-backend"; then
184-
echo "♻️ Restarting \${BACKEND_NAME}..."
185-
pm2 restart "\${BACKEND_NAME}"
182+
if process_exists "${BACKEND_NAME}"; then
183+
echo "♻️ Restarting ${BACKEND_NAME}..."
184+
pm2 restart "${BACKEND_NAME}"
186185
else
187-
echo "🚀 Starting \${BACKEND_NAME}..."
188-
pm2 start \${CONFIG_FILE} --only "\${BACKEND_NAME}"
186+
echo "🚀 Starting ${BACKEND_NAME}..."
187+
pm2 start ${CONFIG_FILE} --only "${BACKEND_NAME}"
189188
fi
190189
191190
# Handle frontend process
192-
if process_exists "\${FRONTEND_NAME}"; then
191+
if process_exists "${FRONTEND_NAME}"; then
193192
echo "♻️ Restarting \${FRONTEND_NAME}..."
194193
pm2 restart "\${FRONTEND_NAME}"
195194
else
@@ -478,20 +477,20 @@ jobs:
478477
479478
# Function to check if a PM2 process exists
480479
process_exists() {
481-
pm2 jlist 2>/dev/null | grep -q "\"name\":\"\\$1\""
480+
pm2 jlist 2>/dev/null | grep -q "\"name\":\"$1\""
482481
}
483482
484483
# Handle backend process
485-
if process_exists "\${BACKEND_NAME}"; then
486-
echo "♻️ Restarting \${BACKEND_NAME}..."
487-
pm2 restart "\${BACKEND_NAME}"
484+
if process_exists "${BACKEND_NAME}"; then
485+
echo "♻️ Restarting ${BACKEND_NAME}..."
486+
pm2 restart "${BACKEND_NAME}"
488487
else
489-
echo "🚀 Starting \${BACKEND_NAME}..."
490-
pm2 start \${CONFIG_FILE} --only "\${BACKEND_NAME}"
488+
echo "🚀 Starting ${BACKEND_NAME}..."
489+
pm2 start ${CONFIG_FILE} --only "${BACKEND_NAME}"
491490
fi
492491
493492
# Handle frontend process
494-
if process_exists "\${FRONTEND_NAME}"; then
493+
if process_exists "${FRONTEND_NAME}"; then
495494
echo "♻️ Restarting \${FRONTEND_NAME}..."
496495
pm2 restart "\${FRONTEND_NAME}"
497496
else

0 commit comments

Comments
 (0)