build: add deploy-v2-site action (#8751)

This commit is contained in:
neverland 2021-05-23 09:02:27 +08:00 committed by GitHub
parent 642d9cca30
commit 9d3d534800
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 20 deletions

29
.github/workflows/deploy-v2-site.yml vendored Normal file
View File

@ -0,0 +1,29 @@
name: Deploy V2 Site
on:
push:
branches: [2.x]
paths:
- 'docs/**'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
with:
ref: '2.x'
- name: Install dependencies
uses: bahmutov/npm-install@v1
- name: Build Site
run: npx --no-install vant-cli build-site
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.1
with:
branch: gh-pages
folder: site
clean: false

View File

@ -1,20 +0,0 @@
name: Sync to Gitee
on:
push:
branches: [dev]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Sync to Gitee
uses: wearerequired/git-mirror-action@master
env:
# 注意在 Settings->Secrets 配置 GITEE_RSA_PRIVATE_KEY
SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
with:
# 注意替换为你的 GitHub 源仓库地址
source-repo: git@github.com:youzan/vant.git
# 注意替换为你的 Gitee 目标仓库地址
destination-repo: git@gitee.com:vant-contrib/vant.git