oh god maybe pm2 finally workin
Some checks are pending
Deploy to Test Environment / deploy-to-test (push) Has started running
Some checks are pending
Deploy to Test Environment / deploy-to-test (push) Has started running
This commit is contained in:
@@ -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/"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user