From f215aaab2c0c172a3c6e2bc58cfff67620584f25 Mon Sep 17 00:00:00 2001 From: RhenCloud Date: Sun, 9 Nov 2025 15:23:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20Vercel=20=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E5=B7=A5=E4=BD=9C=E6=B5=81=EF=BC=8C=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=20vercel=20CLI=20=E9=83=A8=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-to-vercel.yml | 28 +++++++------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/.github/workflows/deploy-to-vercel.yml b/.github/workflows/deploy-to-vercel.yml index 0d6835d..5dd2a32 100644 --- a/.github/workflows/deploy-to-vercel.yml +++ b/.github/workflows/deploy-to-vercel.yml @@ -5,20 +5,6 @@ on: branches: - docs workflow_dispatch: - inputs: - environment: - description: "部署环境" - required: false - default: "production" - type: choice - options: - - production - - preview - force_rebuild: - description: "强制重新构建" - required: false - type: boolean - default: false jobs: vercel-deploy: @@ -44,11 +30,11 @@ jobs: run: pnpm run docs:build - name: Deploy to Vercel - uses: amondnet/vercel-action@v25 - with: - vercel-token: ${{ secrets.VERCEL_TOKEN }} - vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} - vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} - vercel-args: ${{ github.event.inputs.environment == 'preview' && '--' || '--prod' }} + run: | + npm install -g vercel + vercel deploy --prod \ + --token ${{ secrets.VERCEL_TOKEN }} \ + --build-env VUEPRESS_BASE=/ env: - FORCE_REBUILD: ${{ github.event.inputs.force_rebuild }} + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}