mirror of
https://github.com/RhenCloud/Cloud-Index.git
synced 2025-12-06 15:26:10 +08:00
41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
name: Deploy to Vercel
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- docs
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
vercel-deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: "10.12.4"
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Build documentation
|
|
run: pnpm run docs:build
|
|
|
|
- name: Deploy to Vercel
|
|
run: |
|
|
npm install -g vercel
|
|
vercel deploy --prod \
|
|
--token ${{ secrets.VERCEL_TOKEN }} \
|
|
--build-env VUEPRESS_BASE=/
|
|
env:
|
|
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|
|
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
|