feat: 更新 Jenkinsfile,添加部署阶段和环境变量配置

This commit is contained in:
xiaozhou233 committed 2026-08-09 21:34:20 +08:00
1 parent c9f9255e5e
commit 826b867ee9
1 file changed
+19
Vendored
+19
View File
@@ -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 {