Update Jenkinsfile

This commit is contained in:
jassim 2026-01-28 12:44:05 +00:00
parent 56b3959e46
commit 0f4517d7a2

14
Jenkinsfile vendored
View File

@ -134,17 +134,15 @@ pipeline {
cd ${BUILD_PATH} cd ${BUILD_PATH}
echo "Preparing deployment directory..." 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 if [ -d "dist" ]; then
sudo rm -rf ${DEPLOY_PATH}/* sudo mv dist ${DEPLOY_PATH}
sudo cp -r dist/* ${DEPLOY_PATH}/ echo "Dist folder moved successfully to ${DEPLOY_PATH}"
echo "Dist files copied successfully"
elif [ -d "build" ]; then elif [ -d "build" ]; then
sudo rm -rf ${DEPLOY_PATH}/* sudo mv build ${DEPLOY_PATH}
sudo cp -r build/* ${DEPLOY_PATH}/ echo "Build folder moved successfully to ${DEPLOY_PATH}"
echo "Build files copied successfully"
else else
echo "Error: No dist or build directory found!" echo "Error: No dist or build directory found!"
exit 1 exit 1