diff --git a/Jenkinsfile b/Jenkinsfile index 957e94e..5ba2b69 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,6 +5,11 @@ pipeline { nodejs 'nodejs' } + environment { + // Deployment target directory + DEPLOY_DIR = '/var/lib/1panel/www/sites/workstation.xiaozhou233.cn/index/' + } + options { timestamps() disableConcurrentBuilds() @@ -51,6 +56,20 @@ pipeline { } } + stage('Deploy') { + steps { + sh ''' + echo "Deploying to ${DEPLOY_DIR}" + + mkdir -p ${DEPLOY_DIR} + + rsync -av --delete dashboard/dist/ ${DEPLOY_DIR}/ + + echo "Deploy completed" + ''' + } + } + } post {