mirror of
https://github.com/youzan/vant.git
synced 2025-11-28 01:06:29 +08:00
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: neverland <jait.chen@foxmail.com>
63 lines
1.4 KiB
YAML
63 lines
1.4 KiB
YAML
name: Deploy V4 Site
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'packages/vant/docs/**'
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
if: github.repository == 'youzan/vant'
|
|
runs-on: macos-14
|
|
steps:
|
|
- name: Checkout 🛎️
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: 'main'
|
|
|
|
- name: Install pnpm
|
|
run: |
|
|
npm install -g corepack@latest --force
|
|
corepack enable
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22.14.0'
|
|
cache: 'pnpm'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
- name: Build Site
|
|
run: npm run build:site
|
|
|
|
- name: Deploy for GitHub 🚀
|
|
uses: JamesIves/github-pages-deploy-action@v4.7.3
|
|
with:
|
|
branch: gh-pages
|
|
folder: packages/vant/site-dist
|
|
token: ${{ secrets.VANT_UI_TOKEN }}
|
|
repository-name: vant-ui/vant-ui.github.io
|
|
target-folder: vant
|
|
# enable single-commit to reduce the repo size
|
|
single-commit: true
|
|
clean: true
|
|
clean-exclude: |
|
|
1.x/*
|
|
1.x/**/*
|
|
next/*
|
|
next/**/*
|
|
v1/*
|
|
v1/**/*
|
|
v2/*
|
|
v2/**/*
|
|
v3/*
|
|
v3/**/*
|
|
v4/*
|
|
v4/**/*
|
|
vant-use/*
|
|
vant-use/**/*
|