mirror of
https://github.com/RhenCloud/Cloud-Index.git
synced 2025-12-06 07:06:41 +08:00
更新 Vercel 部署工作流,直接使用 vercel CLI 部署
This commit is contained in:
28
.github/workflows/deploy-to-vercel.yml
vendored
28
.github/workflows/deploy-to-vercel.yml
vendored
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user