oh god maybe pm2 finally workin
Some checks are pending
Deploy to Test Environment / deploy-to-test (push) Has started running

This commit is contained in:
2026-02-17 23:53:47 -08:00
parent 029b621632
commit 204fe4394a
2 changed files with 9 additions and 0 deletions

View File

@@ -121,6 +121,11 @@ jobs:
run: |
echo "Deploying application files to /var/www/flyer-crawler.projectium.com..."
APP_PATH="/var/www/flyer-crawler.projectium.com"
# CRITICAL: Stop PM2 processes BEFORE deploying files to prevent CWD errors
echo "--- Stopping production PM2 processes before file deployment ---"
pm2 stop flyer-crawler-api flyer-crawler-worker flyer-crawler-analytics-worker || echo "No production processes to stop"
mkdir -p "$APP_PATH"
mkdir -p "$APP_PATH/flyer-images/icons" "$APP_PATH/flyer-images/archive"
rsync -avz --delete --exclude 'node_modules' --exclude '.git' --exclude 'dist' --exclude 'flyer-images' ./ "$APP_PATH/"

View File

@@ -506,6 +506,10 @@ jobs:
echo "Deploying application files to /var/www/flyer-crawler-test.projectium.com..."
APP_PATH="/var/www/flyer-crawler-test.projectium.com"
# CRITICAL: Stop PM2 processes BEFORE deploying files to prevent CWD errors
echo "--- Stopping test PM2 processes before file deployment ---"
pm2 stop flyer-crawler-api-test flyer-crawler-worker-test flyer-crawler-analytics-worker-test || echo "No test processes to stop"
# Ensure the destination directory exists
mkdir -p "$APP_PATH"
mkdir -p "$APP_PATH/flyer-images/icons" "$APP_PATH/flyer-images/archive" # Ensure all required subdirectories exist