Skip to content

Commit 7741344

Browse files
committed
ci: build docs separately
1 parent 847935b commit 7741344

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

.github/workflows/code-quality.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ jobs:
2121
- name: Build project
2222
run: pnpm run build
2323

24+
- name: Build docs
25+
run: pnpm run build
26+
working-directory: ./docs
27+
2428
- name: Run lint
2529
run: pnpm run lint
2630

.github/workflows/gh-pages.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ jobs:
2525
- name: Build packages
2626
run: pnpm run build
2727

28+
- name: Build docs
29+
run: pnpm run build
30+
working-directory: ./docs
31+
2832
- name: Deploy pages
2933
uses: peaceiris/actions-gh-pages@v3
3034
with:

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ jobs:
2424
- name: Build project
2525
run: pnpm run build
2626

27+
- name: Build docs
28+
run: pnpm run build
29+
working-directory: ./docs
30+
2731
- name: Run lint
2832
run: pnpm run lint
2933

scripts/build.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,10 @@ const spinner = ora().start();
66

77
spinner.color = 'red';
88

9-
// Include docs in the build process
10-
const buildTargets = [...packages, 'docs'];
11-
12-
for (const [index, target] of buildTargets.entries()) {
13-
spinner.text = `Building ${target} [${index + 1}/${buildTargets.length}]`;
9+
for (const [index, target] of packages.entries()) {
10+
spinner.text = `Building ${target} [${index + 1}/${packages.length}]`;
1411
try {
15-
const buildPath = target === 'docs' ? './docs' : `./packages/${target}`;
12+
const buildPath = `./packages/${target}`;
1613
await execAsync(`pnpm run build`, buildPath);
1714
} catch (e) {
1815
spinner.fail(`Failed to build ${target}: \n ${e}`);

0 commit comments

Comments
 (0)