Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1420db1

Browse files
committedSep 29, 2024·
switch to mkdocs
1 parent 275f189 commit 1420db1

Some content is hidden

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

47 files changed

+883
-1573
lines changed
 

‎.config/.readthedocs.yaml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,16 @@ build:
99
os: ubuntu-22.04
1010
tools:
1111
rust: latest
12-
commands:
13-
# install cargo-binstall
14-
- >-
15-
curl
16-
-L --proto '=https' --tlsv1.2 -sSf
17-
https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh
18-
| bash
19-
# add .cargo bin to PATH
20-
# install mdbook and mdbook-alerts
21-
# build docs
22-
- >-
23-
PATH=/home/docs/.cargo/bin:$PATH &&
24-
cargo binstall --install-path /home/docs/.cargo/bin -y mdbook mdbook-alerts &&
25-
mdbook build docs
26-
# move HTML output to required RTD output path
27-
- mkdir -p ${READTHEDOCS_OUTPUT}
28-
- mv docs/book/html/ "${READTHEDOCS_OUTPUT}"
12+
python: latest
13+
14+
mkdocs:
15+
configuration: docs/mkdocs.yml
16+
17+
18+
# Optionally declare the Python requirements required to build your docs
19+
20+
python:
21+
install:
22+
- requirements: docs/requirements.txt
23+
- method: pip
24+
path: docs/

‎.github/workflows/build-docs.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
key: ${{ runner.os }}-docs-cargo-${{ hashFiles('Cargo.lock') }}
3737
- run: cargo fetch
3838

39-
build-mdbook:
39+
build-mkdocs:
4040
runs-on: ubuntu-latest
4141
needs: [cache-deps]
4242
permissions:
@@ -48,26 +48,30 @@ jobs:
4848
with:
4949
path: ~/.cargo
5050
key: ${{ runner.os }}-docs-cargo-${{ hashFiles('Cargo.lock') }}
51-
- name: Install mdbook
52-
uses: taiki-e/install-action@v2
51+
- uses: actions/setup-python@v5
5352
with:
54-
tool: mdbook,cargo-binstall,just
55-
- name: Install mdbook plugins
56-
run: cargo binstall -y mdbook-alerts
53+
python-version: 3.x
54+
cache: 'pip'
55+
cache-dependency-path: docs/requirements.txt
56+
- name: Install workflow deps
57+
run: |
58+
pip install -r docs/requirements.txt
59+
pip install --force-reinstall -v docs/
5760
- name: Build book
58-
run: just docs-build
61+
working-directory: docs
62+
run: mkdocs build
5963
- name: Upload docs build as artifact
6064
uses: actions/upload-artifact@v4
6165
with:
6266
name: cpp-linter-docs
63-
path: docs/book/html
67+
path: docs/site
6468
- name: Upload to github pages
6569
# only publish doc changes from main branch
6670
if: github.ref == 'refs/heads/main'
6771
uses: peaceiris/actions-gh-pages@v4
6872
with:
6973
github_token: ${{ secrets.GITHUB_TOKEN }}
70-
publish_dir: docs/book/html
74+
publish_dir: docs/site
7175

7276
build-rustdoc:
7377
runs-on: ubuntu-latest
@@ -80,7 +84,7 @@ jobs:
8084
with:
8185
path: ~/.cargo
8286
key: ${{ runner.os }}-docs-cargo-${{ hashFiles('Cargo.lock') }}
83-
- name: Install mdbook
87+
- name: Install just
8488
uses: taiki-e/install-action@v2
8589
with:
8690
tool: just

0 commit comments

Comments
 (0)
Please sign in to comment.