diff --git a/Jenkinsfile b/Jenkinsfile index a7b2e59..1cf59aa 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -134,17 +134,15 @@ pipeline { cd ${BUILD_PATH} echo "Preparing deployment directory..." - sudo mkdir -p ${DEPLOY_PATH} + sudo rm -rf ${DEPLOY_PATH} - echo "Moving dist files to deployment directory..." + echo "Moving entire dist folder to /var/www/..." if [ -d "dist" ]; then - sudo rm -rf ${DEPLOY_PATH}/* - sudo cp -r dist/* ${DEPLOY_PATH}/ - echo "Dist files copied successfully" + sudo mv dist ${DEPLOY_PATH} + echo "Dist folder moved successfully to ${DEPLOY_PATH}" elif [ -d "build" ]; then - sudo rm -rf ${DEPLOY_PATH}/* - sudo cp -r build/* ${DEPLOY_PATH}/ - echo "Build files copied successfully" + sudo mv build ${DEPLOY_PATH} + echo "Build folder moved successfully to ${DEPLOY_PATH}" else echo "Error: No dist or build directory found!" exit 1