-
Notifications
You must be signed in to change notification settings - Fork 32
42 lines (38 loc) · 1.13 KB
/
docs-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: DOCS to GitHub Pages
on:
workflow_dispatch:
push:
branches:
- master
paths:
- docs/zebra-swiper-docs/**
- example/cli/**
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build H5 for example-cli
run: pnpm run build:h5
working-directory: example/cli
- name: Copy H5 build output
run: cp -r example/cli/dist/build/h5 docs/zebra-swiper-docs/public
- name: Build with VitePress
run: pnpm run docs:build
working-directory: docs/zebra-swiper-docs
- name: Deploy for Github 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: docs/zebra-swiper-docs/.vitepress/dist
# enable single-commit to reduce the repo size
single-commit: true
clean: true