-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.09 KB
/
docs.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
43
44
45
46
47
48
49
50
51
name: Docs
env:
USE_LOCKFILE: ${{ secrets.USE_LOCKFILE }}
ENABLE_DOCS: ${{ secrets.ENABLE_DOCS }}
on:
push:
branches: [ master ]
repository_dispatch:
types: [ docs ]
jobs:
docs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["lts/*"]
steps:
- uses: actions/checkout@v4
if: "env.ENABLE_DOCS == 'true'"
- name: Setup
uses: ./.github/actions/composite-setup
if: "env.ENABLE_DOCS == 'true'"
with:
USE_LOCKFILE: ${{ env.USE_LOCKFILE }}
- name: Build
uses: ./.github/actions/composite-build
if: "env.ENABLE_DOCS == 'true'"
with:
USE_LOCKFILE: ${{ env.USE_LOCKFILE }}
- run: pnpm doc
if: "env.ENABLE_DOCS == 'true'"
- run: pnpm install --frozen-lockfile
working-directory: demo
- run: pnpm demo:build
- name: Documentation
uses: crazy-max/ghaction-github-pages@v4
if: "env.ENABLE_DOCS == 'true'"
with:
jekyll: false
target_branch: gh-pages
build_dir: docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}