docs: add hnsw docs (#1570) #9
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: Deploy docs to Pages | |
on: | |
push: | |
branches: ["main"] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
# Single deploy job since we're just deploying | |
build: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: buildjet-8vcpu-ubuntu-2204 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install dependecies needed for ubuntu | |
run: | | |
sudo apt install -y protobuf-compiler libssl-dev | |
rustup update && rustup default | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
cache: "pip" | |
cache-dependency-path: "docs/requirements.txt" | |
- name: Build Python | |
working-directory: python | |
run: | | |
python -m pip install -e . | |
python -m pip install -r ../docs/requirements.txt | |
- name: Set up node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
cache-dependency-path: node/package-lock.json | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install node dependencies | |
working-directory: node | |
run: | | |
sudo apt update | |
sudo apt install -y protobuf-compiler libssl-dev | |
- name: Build node | |
working-directory: node | |
run: | | |
npm ci | |
npm run build | |
npm run tsc | |
- name: Create markdown files | |
working-directory: node | |
run: | | |
npx typedoc --plugin typedoc-plugin-markdown --out ../docs/src/javascript src/index.ts | |
- name: Build docs | |
working-directory: docs | |
run: | | |
PYTHONPATH=. mkdocs build | |
- name: Setup Pages | |
uses: actions/configure-pages@v2 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: "docs/site" | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |