Skip to content

Commit 00c6f52

Browse files
committed
ci: separate the docs action [skip ci]
1 parent 3979b82 commit 00c6f52

File tree

2 files changed

+72
-68
lines changed

2 files changed

+72
-68
lines changed

.github/workflows/CI.yml

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -160,71 +160,3 @@ jobs:
160160
run: |
161161
pnpm run clean
162162
pnpm run test
163-
164-
Docs:
165-
if: "startsWith(github.ref, 'refs/tags/') && !contains(github.event.head_commit.message, '[skip ci]')"
166-
runs-on: ubuntu-22.04
167-
strategy:
168-
fail-fast: false
169-
matrix:
170-
os:
171-
- ubuntu-22.04
172-
node_version:
173-
- 18
174-
node_arch:
175-
- x64
176-
cpp_arch:
177-
- x64
178-
ARCH:
179-
- x64
180-
zmq_draft:
181-
- false
182-
env:
183-
ZMQ_DRAFT: ${{ matrix.zmq_draft }}
184-
ZMQ_SHARED: false
185-
ARCH: ${{ matrix.ARCH }}
186-
187-
steps:
188-
- uses: actions/checkout@v3
189-
190-
- name: Cache
191-
uses: actions/cache@v3
192-
with:
193-
path: |
194-
./node_modules/
195-
./build/
196-
key: "cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch }}-ZMQ_DRAFT:${{ matrix.zmq_draft }}-Node:${{ matrix.node_version }}-${{ hashFiles('./package.json') }}"
197-
restore-keys: |
198-
"cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch }}-ZMQ_DRAFT:${{ matrix.zmq_draft }}-Node:${{ matrix.node_version }}-"
199-
200-
- name: Setup Cpp
201-
uses: aminya/setup-cpp@v1
202-
with:
203-
cmake: true
204-
architecture: ${{ matrix.cpp_arch }}
205-
206-
- uses: pnpm/[email protected]
207-
with:
208-
version: 7
209-
210-
- name: Install Node
211-
uses: actions/setup-node@v3
212-
with:
213-
node-version: ${{ matrix.node_version }}
214-
architecture: ${{ matrix.node_arch }}
215-
cache: "pnpm"
216-
217-
- name: Build Documentation
218-
if: "${{ contains(matrix.os, 'ubuntu') && !matrix.docker }}"
219-
run: |
220-
pnpm install
221-
pnpm run build.doc
222-
223-
- name: Deploy Documentation
224-
if: "${{ contains(matrix.os, 'ubuntu') && !matrix.docker }}"
225-
uses: Cecilapp/GitHub-Pages-deploy@v3
226-
with:
227-
build_dir: docs
228-
branch: gh-pages
229-
env:
230-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/docs.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: docs
2+
on:
3+
create:
4+
types: [tag]
5+
6+
jobs:
7+
Docs:
8+
runs-on: ubuntu-22.04
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
os:
13+
- ubuntu-22.04
14+
node_version:
15+
- 18
16+
node_arch:
17+
- x64
18+
cpp_arch:
19+
- x64
20+
ARCH:
21+
- x64
22+
zmq_draft:
23+
- false
24+
env:
25+
ZMQ_DRAFT: ${{ matrix.zmq_draft }}
26+
ZMQ_SHARED: false
27+
ARCH: ${{ matrix.ARCH }}
28+
29+
steps:
30+
- uses: actions/checkout@v3
31+
32+
- name: Cache
33+
uses: actions/cache@v3
34+
with:
35+
path: |
36+
./node_modules/
37+
./build/
38+
key: "cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch }}-ZMQ_DRAFT:${{ matrix.zmq_draft }}-Node:${{ matrix.node_version }}-${{ hashFiles('./package.json') }}"
39+
restore-keys: |
40+
"cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch }}-ZMQ_DRAFT:${{ matrix.zmq_draft }}-Node:${{ matrix.node_version }}-"
41+
42+
- name: Setup Cpp
43+
uses: aminya/setup-cpp@v1
44+
with:
45+
cmake: true
46+
architecture: ${{ matrix.cpp_arch }}
47+
48+
- uses: pnpm/[email protected]
49+
with:
50+
version: 7
51+
52+
- name: Install Node
53+
uses: actions/setup-node@v3
54+
with:
55+
node-version: ${{ matrix.node_version }}
56+
architecture: ${{ matrix.node_arch }}
57+
cache: "pnpm"
58+
59+
- name: Build Documentation
60+
if: "${{ contains(matrix.os, 'ubuntu') && !matrix.docker }}"
61+
run: |
62+
pnpm install
63+
pnpm run build.doc
64+
65+
- name: Deploy Documentation
66+
if: "${{ contains(matrix.os, 'ubuntu') && !matrix.docker }}"
67+
uses: Cecilapp/GitHub-Pages-deploy@v3
68+
with:
69+
build_dir: docs
70+
branch: gh-pages
71+
env:
72+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)