Skip to content

Commit 31cb595

Browse files
committed
ci(deploy-docs): build one book per workflow step
1 parent e824848 commit 31cb595

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.github/workflows/deploy-docs.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,28 @@ jobs:
2424
uses: taiki-e/install-action@v2
2525
with:
2626
tool: mdbook
27-
- name: Build book
27+
- name: Prepare directories
28+
run: |
29+
mkdir -p ${{ runner.temp }}/book
30+
mkdir -p ${{ runner.temp }}/book/devel
31+
mkdir -p ${{ runner.temp }}/book/dev-guide
32+
- name: Build user-guide (stable)
2833
run: |
29-
# Build for stable
3034
git checkout stable
3135
# Support both old and new directory structure during the transition
3236
cd doc/user-guide || cd doc
3337
mdbook build
3438
mv book ${{ runner.temp }}
35-
# Build for master
36-
cd $(git rev-parse --show-toplevel)
39+
- name: Build user-guide (master)
40+
run: |
3741
git checkout master
3842
cd doc/user-guide
3943
mdbook build
4044
mv book ${{ runner.temp }}/book/devel
41-
# Build dev-guide for master
42-
cd ../dev-guide
45+
- name: Build dev-guide (master)
46+
run: |
47+
git checkout master
48+
cd doc/dev-guide
4349
mdbook build
4450
mv book ${{ runner.temp }}/book/dev-guide
4551
- name: Deploy to GitHub

0 commit comments

Comments
 (0)