From 44fa52cd8bdf8dd1cb7f2cfb59472d6a24ca513e Mon Sep 17 00:00:00 2001 From: YuCheng Hu Date: Fri, 26 Jun 2026 13:57:26 -0400 Subject: [PATCH] change Jenkinsfile --- Jenkinsfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5e10f1c..3659391 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -71,10 +71,14 @@ pipeline { steps { script { def branchArg = env.CHANGE_ID - ? "--branch=pr-${env.CHANGE_ID}" - : "--branch=${env.BRANCH_NAME}" + ? "pr-${env.CHANGE_ID}" + : "${env.BRANCH_NAME}" - sh "pnpm wrangler pages deploy ./.vitepress/dist --project-name=${PRJ_NAME} ${branchArg}" + if (env.BRANCH_NAME == 'main') { + sh 'npx wrangler deploy' + } else { + sh "npx wrangler versions upload --preview-alias ${branchArg}" + } } } }