From 976d2797a0dcca269293b14a00120dfa1d3262f8 Mon Sep 17 00:00:00 2001 From: YuCheng Hu Date: Tue, 9 Jun 2026 14:03:51 -0400 Subject: [PATCH 1/3] Push Jenkinsfile for build test --- Jenkinsfile | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index da7d5c9..2765e19 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -37,11 +37,9 @@ pipeline { steps { script { // This command should run on the agent to configure the git environment - sh 'git config --global url."https://github.com/".insteadOf git://github.com/' - - sh 'corepack enable' - - sh 'corepack prepare pnpm@latest --activate' + sh 'git config --global url."https://github.com/".insteadOf git://github.com/' + sh 'corepack enable' + sh 'corepack prepare pnpm@latest --activate' } // git branch: 'main', // credentialsId: 'c9d0ec7c-0749-4588-8960-e96cab84d462', @@ -49,12 +47,23 @@ pipeline { } } + stage("Install") { + steps { + sh ''' + pnpm clean --lockfile + pnpm install --no-frozen-lockfile || true + pnpm approve-builds --all + pnpm install --no-frozen-lockfile + ''' + } + } + stage('Build / Package') { steps { - sh 'pnpm approve-builds --all' - sh 'pnpm install --frozen-lockfile' - sh 'npx browserslist@latest --update-db' - sh 'pnpm run docs:build' + sh ''' + npx browserslist@latest --update-db + npm run docs:build + ''' } } -- 2.43.0 From 8c3cc2e720fb822bca3660208c34d4a0835ed7ae Mon Sep 17 00:00:00 2001 From: YuCheng Hu Date: Tue, 9 Jun 2026 14:05:48 -0400 Subject: [PATCH 2/3] Update the env --- Jenkinsfile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2765e19..5ef167b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -67,12 +67,15 @@ pipeline { } } - stage('Deploy to Cloudflare') { + stage('Deploy to Cloudflare') { steps { - // Install Wrangler locally for the project - sh 'pnpm add -D wrangler@latest' - // Deploy - sh "pnpm wrangler pages deploy ./.vitepress/dist --project-name=${PRJ_NAME} --branch=main" + script { + def branchArg = env.CHANGE_ID + ? "--branch=pr-${env.CHANGE_ID}" + : "--branch=${env.BRANCH_NAME}" + + sh "pnpm wrangler pages deploy ./dist --project-name=${PRJ_NAME} ${branchArg}" + } } } -- 2.43.0 From f406e8d6faa6f18052780bdd7ee7319b4ae14d01 Mon Sep 17 00:00:00 2001 From: YuCheng Hu Date: Tue, 9 Jun 2026 14:09:03 -0400 Subject: [PATCH 3/3] Update the push folder --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5ef167b..5e10f1c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -74,7 +74,7 @@ pipeline { ? "--branch=pr-${env.CHANGE_ID}" : "--branch=${env.BRANCH_NAME}" - sh "pnpm wrangler pages deploy ./dist --project-name=${PRJ_NAME} ${branchArg}" + sh "pnpm wrangler pages deploy ./.vitepress/dist --project-name=${PRJ_NAME} ${branchArg}" } } } -- 2.43.0