mirror of
https://github.com/RhenCloud/Cloud-Index.git
synced 2025-12-06 15:26:10 +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:
|
branches:
|
||||||
- docs
|
- docs
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
|
||||||
environment:
|
|
||||||
description: "部署环境"
|
|
||||||
required: false
|
|
||||||
default: "production"
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- production
|
|
||||||
- preview
|
|
||||||
force_rebuild:
|
|
||||||
description: "强制重新构建"
|
|
||||||
required: false
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
vercel-deploy:
|
vercel-deploy:
|
||||||
@@ -44,11 +30,11 @@ jobs:
|
|||||||
run: pnpm run docs:build
|
run: pnpm run docs:build
|
||||||
|
|
||||||
- name: Deploy to Vercel
|
- name: Deploy to Vercel
|
||||||
uses: amondnet/vercel-action@v25
|
run: |
|
||||||
with:
|
npm install -g vercel
|
||||||
vercel-token: ${{ secrets.VERCEL_TOKEN }}
|
vercel deploy --prod \
|
||||||
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
|
--token ${{ secrets.VERCEL_TOKEN }} \
|
||||||
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
|
--build-env VUEPRESS_BASE=/
|
||||||
vercel-args: ${{ github.event.inputs.environment == 'preview' && '--' || '--prod' }}
|
|
||||||
env:
|
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