mirror of
https://github.com/RhenCloud/Cloud-Index.git
synced 2025-12-06 15:26:10 +08:00
更新 Vercel 部署工作流,添加环境和强制重建输入选项
This commit is contained in:
18
.github/workflows/deploy-to-vercel.yml
vendored
18
.github/workflows/deploy-to-vercel.yml
vendored
@@ -5,6 +5,20 @@ 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:
|
||||
@@ -35,4 +49,6 @@ jobs:
|
||||
vercel-token: ${{ secrets.VERCEL_TOKEN }}
|
||||
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
|
||||
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
|
||||
vercel-args: --prod
|
||||
vercel-args: ${{ github.event.inputs.environment == 'preview' && '--' || '--prod' }}
|
||||
env:
|
||||
FORCE_REBUILD: ${{ github.event.inputs.force_rebuild }}
|
||||
|
||||
Reference in New Issue
Block a user