-
-
Notifications
You must be signed in to change notification settings - Fork 211
81 lines (72 loc) · 2.08 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: docs
on:
push:
tags:
- "*"
workflow_dispatch:
jobs:
Docs:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
node_version:
- 18
node_arch:
- x64
cpp_arch:
- x64
env:
npm_config_zmq_draft: false
npm_config_zmq_shared: false
npm_config_arch: ${{ matrix.node_arch }}
npm_config_target_arch: ${{ matrix.node_arch }}
setup_node_arch: ${{ matrix.node_arch }}
steps:
- uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: |
./node_modules/
./build/
key:
# prettier-ignore
"cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch}}-ZMQ_DRAFT:${{env.npm_config_zmq_draft }}-Node:${{ matrix.node_version}}-${{hashFiles('./package.json') }}-docs"
restore-keys: |
"cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch }}-ZMQ_DRAFT:${{ env.npm_config_zmq_draft }}-Node:${{ matrix.node_version }}-"
- name: Env map
run: |
if [ "${{ matrix.node_arch }}" = "ia32" ]; then
echo "setup_node_arch=x86" > $GITHUB_ENV
fi
shell: bash
- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
vcvarsall: ${{ contains(matrix.os, 'windows') }}
cmake: true
python: true
architecture: ${{ matrix.cpp_arch }}
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
architecture: ${{ env.setup_node_arch }}
- name: Build Documentation
run: |
pnpm install
pnpm run build.doc
- name: Deploy Documentation
uses: Cecilapp/GitHub-Pages-deploy@v3
with:
build_dir: docs
branch: gh-pages
email: ${{ github.actor }}@users.noreply.github.com
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}