Fix and add checks for no kv cache (#776) #1012
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- 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 |