mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-23 23:19:15 +08:00
build: add deploy-v2-site action (#8751)
This commit is contained in:
parent
642d9cca30
commit
9d3d534800
29
.github/workflows/deploy-v2-site.yml
vendored
Normal file
29
.github/workflows/deploy-v2-site.yml
vendored
Normal 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
|
20
.github/workflows/sync.yml
vendored
20
.github/workflows/sync.yml
vendored
@ -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
|
Loading…
x
Reference in New Issue
Block a user