Update Jenkinsfile
This commit is contained in:
parent
0f4517d7a2
commit
2ced49373c
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user