Skip to content

docs: Enable the search plugin #89

docs: Enable the search plugin

docs: Enable the search plugin #89

Workflow file for this run

name: Build and deploy docs
on:
push:
branches:
- main
paths:
- "docs/**.md"
- "docs/mkdocs.yml"
workflow_dispatch:
jobs:
test-examples:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- run: |
mkdir /tmp/protoc && \
cd /tmp/protoc && \
wget --quiet -O protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v3.19.3/protoc-3.19.3-linux-x86_64.zip && \
unzip protoc.zip && \
mv /tmp/protoc/bin/protoc /usr/local/bin && \
chmod a+x /usr/local/bin/protoc && \
rm -rf /tmp/protoc
- run: cargo build --manifest-path ./examples/rust/getting-started/Cargo.toml
build-and-deploy:
needs: test-examples
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout Github repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Install dependencies
run: |
mkdir /tmp/protoc && \
cd /tmp/protoc && \
wget --quiet -O protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v3.19.3/protoc-3.19.3-linux-x86_64.zip && \
unzip protoc.zip && \
mv /tmp/protoc/bin/protoc /usr/local/bin && \
chmod a+x /usr/local/bin/protoc && \
rm -rf /tmp/protoc \
- name: Install poetry dependencies
run: poetry install --with docs
- name: Build docs
env:
DOCSBRANCH: "gh-pages"
DOCSREMOTE: "origin"
GITHUB_TOKEN: "${{ secrets.GH_PAGES_PAT }}"
run: mkdir -p ${GITHUB_WORKSPACE}/site/
- run: cd docs && poetry run mkdocs build --verbose --strict --clean --site-dir=${GITHUB_WORKSPACE}/site/
- run: poetry run pdoc -o ${GITHUB_WORKSPACE}/site/py glclient
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site