From 2ced49373c80aeed716593528fae4fb9782eef67 Mon Sep 17 00:00:00 2001 From: jassim Date: Wed, 28 Jan 2026 12:50:45 +0000 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1cf59aa..fd1725e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -134,15 +134,17 @@ pipeline { cd ${BUILD_PATH} echo "Preparing deployment directory..." - sudo rm -rf ${DEPLOY_PATH} + sudo mkdir -p ${DEPLOY_PATH} + sudo rm -rf ${DEPLOY_PATH}/dist + sudo rm -rf ${DEPLOY_PATH}/build - echo "Moving entire dist folder to /var/www/..." + echo "Moving entire dist folder to ${DEPLOY_PATH}/..." if [ -d "dist" ]; then - sudo mv dist ${DEPLOY_PATH} - echo "Dist folder moved successfully to ${DEPLOY_PATH}" + sudo cp -r dist ${DEPLOY_PATH}/ + echo "Dist folder copied successfully to ${DEPLOY_PATH}/dist" elif [ -d "build" ]; then - sudo mv build ${DEPLOY_PATH} - echo "Build folder moved successfully to ${DEPLOY_PATH}" + sudo cp -r build ${DEPLOY_PATH}/ + echo "Build folder copied successfully to ${DEPLOY_PATH}/build" else echo "Error: No dist or build directory found!" exit 1