-
Notifications
You must be signed in to change notification settings - Fork 311
55 lines (51 loc) · 1.29 KB
/
docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: docs
#https://dev.to/deciduously/prepare-your-rust-api-docs-for-github-pages-2n5i
on:
push:
branches: ["master"]
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable]
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Setup Pages
uses: actions/configure-pages@v5
- uses: actions-rs/cargo@v1
with:
command: doc
args: --no-deps
- name: Build docs
run: |
rm -rf ./docs
echo "<meta http-equiv=\"refresh\" content=\"0; url=mistralrs\">" > target/doc/index.html
cp -r target/doc ./docs
- name: Build Python docs
run: |
python3 -m venv myenv
source myenv/bin/activate
pip install maturin[patchelf] pdoc
cd mistralrs-pyo3
maturin develop
cd ..
pdoc mistralrs -o ./docs/pyo3
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ./docs