Skip to content

Commit 4e602fb

Browse files
authored
Merge pull request #3436 from rbtcollins/dev-docs-toc
Dev-docs-toc
2 parents bc29903 + 04b72ff commit 4e602fb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+460
-356
lines changed

.github/workflows/deploy-docs.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ on:
66
- stable
77
- master
88

9+
# Builds all docs for both stable and master branches.
10+
# In the gh-pages branch, we place:
11+
# stable user-guide at /
12+
# master user-guide at /devel
13+
# master dev-guide at /dev-guide
14+
915
jobs:
1016
doc:
1117
name: Documentation
@@ -21,13 +27,22 @@ jobs:
2127
echo "`pwd`/mdbook" >> $GITHUB_PATH
2228
- name: Build book
2329
run: |
30+
# Build for stable
2431
git checkout stable
25-
cd doc
32+
# Support both old and new directory structure during the transition
33+
cd doc/user-guide || cd doc
2634
mdbook build
2735
mv book ${{ runner.temp }}
36+
# Build for master
37+
cd $(git rev-parse --show-toplevel)
2838
git checkout master
39+
cd doc/user-guide
2940
mdbook build
3041
mv book ${{ runner.temp }}/book/devel
42+
# Build dev-guide for master
43+
cd ../dev-guide
44+
mdbook build
45+
mv book ${{ runner.temp }}/book/dev-guide
3146
- name: Deploy to GitHub
3247
run: |
3348
cd ${{ runner.temp }}/book

.github/workflows/test-docs.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test build docs on PR
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "*"
7+
8+
# Builds docs for both stable and master branches.
9+
# stable is placed in the root of the gh-pages branch, while master is placed at /devel
10+
11+
jobs:
12+
doc:
13+
name: Documentation
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
19+
- name: Install mdbook
20+
run: |
21+
mkdir mdbook
22+
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.6/mdbook-v0.4.6-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
23+
echo "`pwd`/mdbook" >> $GITHUB_PATH
24+
- name: Build user-guide
25+
run: |
26+
cd doc/user-guide
27+
mdbook build
28+
- name: Build dev-guide
29+
run: |
30+
cd doc/dev-guide
31+
mdbook build

0 commit comments

Comments
 (0)