Build and deploy docs #49
Workflow file for this run
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: Build and deploy docs | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "docs/**.md" | |
- "docs/mkdocs.yml" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Github repo | |
uses: actions/checkout@v3 | |
- name: Set up Python Virtualenv | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Setup venv | |
run: | | |
python3 -m venv .venv | |
- uses: dtolnay/rust-toolchain@nightly | |
- name: Set up dependencies | |
run: | | |
.venv/bin/pip install -U maturin pip | |
sudo apt-get update -qq | |
sudo apt-get install -y -qq make | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v2 | |
with: | |
version: "23.2" | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install dependencies | |
run: | | |
.venv/bin/pip install \ | |
grpcio \ | |
grpcio-tools \ | |
"protobuf==3.20.3" \ | |
mkdocs \ | |
pdoc \ | |
mkdocs-material \ | |
mkdocs-redirects \ | |
pymdown-extensions \ | |
ghp-import \ | |
pdoc \ | |
cairosvg \ | |
pillow \ | |
typing_extensions | |
- name: Build and install gl-client-py | |
run: | | |
(cd libs/gl-client-py; ../../.venv/bin/maturin develop) | |
- name: Build docs | |
env: | |
DOCSBRANCH: "gh-pages" | |
DOCSREMOTE: "origin" | |
run: | | |
rm libs/gl-client-py/glclient/*.pyi | |
PATH=$(pwd)/.venv/bin:$PATH make docs |