Skip to content

Commit b1011fe

Browse files
committed
feat: use mkdocs for documentation
1 parent 98b0d6b commit b1011fe

80 files changed

Lines changed: 4272 additions & 4575 deletions

Some content is hidden

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

.github/workflows/docs-deploy.yml

Lines changed: 32 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,43 @@
1-
name: Deploy docs to Pages
1+
# Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing,
8+
# software distributed under the License is distributed on an
9+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
10+
# KIND, either express or implied. See the License for the
11+
# specific language governing permissions and limitations
12+
# under the License.
213

14+
name: publish-site
315
on:
416
push:
5-
branches: ["main"]
17+
branches:
18+
- main
619

7-
# Allows you to run this workflow manually from the Actions tab
8-
workflow_dispatch:
9-
10-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1120
permissions:
12-
contents: read
13-
pages: write
14-
id-token: write
15-
16-
# Allow one concurrent deployment
17-
concurrency:
18-
group: "pages"
19-
cancel-in-progress: true
20-
21-
env:
22-
RUSTFLAGS: "-C debuginfo=0"
23-
# according to: https://matklad.github.io/2021/09/04/fast-rust-builds.html
24-
# CI builds are faster with incremental disabled.
25-
CARGO_INCREMENTAL: "0"
21+
contents: write
2622

2723
jobs:
28-
# Single deploy job since we're just deploying
2924
deploy:
30-
environment:
31-
name: github-pages
32-
url: ${{ steps.deployment.outputs.page_url }}
33-
runs-on: ubuntu-24.04
25+
runs-on: ubuntu-latest
3426
steps:
35-
- name: Checkout
36-
uses: actions/checkout@v4
37-
- name: Set up Python
38-
uses: actions/setup-python@v5
39-
with:
40-
python-version: "3.11"
41-
cache: 'pip'
42-
cache-dependency-path: "docs/requirements.txt"
43-
- name: Install dependencies
27+
- uses: actions/checkout@v4
28+
- name: Configure Git Credentials
4429
run: |
45-
sudo apt install -y -qq doxygen pandoc
46-
- name: Build python wheel
47-
uses: ./.github/workflows/build_linux_wheel
48-
- name: Free disk space
49-
working-directory: python
50-
run: |
51-
sudo chown 1001:118 -R target
52-
mv target/wheels/*.whl ./
53-
cargo clean
54-
- name: Build Python
55-
working-directory: python
56-
run: |
57-
python -m pip install ../python/*.whl
58-
python -m pip install -r ../docs/requirements.txt
59-
- name: Build docs
60-
working-directory: docs
61-
run: |
62-
make nbconvert
63-
make html
64-
- name: Setup Pages
65-
uses: actions/configure-pages@v5
66-
- name: Upload artifact
67-
uses: actions/upload-pages-artifact@v3
30+
git config user.name github-actions[bot]
31+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
32+
- uses: actions/setup-python@v5
33+
with:
34+
python-version: 3.x
35+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
36+
- uses: actions/cache@v4
6837
with:
69-
path: 'docs/_build/html'
70-
- name: Deploy to GitHub Pages
71-
id: deployment
72-
uses: actions/deploy-pages@v4
38+
key: mkdocs-material-${{ env.cache_id }}
39+
path: .cache
40+
restore-keys: |
41+
mkdocs-material-
42+
- run: pip install -r docs/requirements.txt
43+
- run: mkdocs gh-deploy --force

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ logs
6363

6464
docs/_build
6565
docs/api/python
66+
docs/site
67+
docs/build
6668

6769
**/.ipynb_checkpoints/
6870
docs/notebooks

docs/Makefile

Lines changed: 0 additions & 30 deletions
This file was deleted.

docs/_static/custom.css

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/api/api.rst

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/api/py_modules.rst

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/api/python.rst

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)