Skip to content

Commit

Permalink
chore: fix docs building (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
ss2165 authored Nov 26, 2024
1 parent 905cc45 commit b722aaf
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 21 deletions.
27 changes: 11 additions & 16 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,33 @@ concurrency:
group: "pages"
cancel-in-progress: true


env:
UV_VERSION: "0.4.29"

jobs:
build:
defaults:
run:
working-directory: python
name: Build docs.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python '3.10'
uses: actions/setup-python@v5
- name: Set up uv
uses: astral-sh/setup-uv@v3
with:
python-version: '3.10'
cache: "pip"
version: ${{ env.UV_VERSION }}
enable-cache: true
- name: Install Protoc
uses: arduino/setup-protoc@v2
- name: Install Tierkreis
run: pip install '.[typecheck,docs]'

- name: Build docs
run: |
cd docs
./build.sh
run: uv run --group docs scripts/build_py_docs.sh
- name: Upload artifact.
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/build/
path: ./python/docs/build/

publish:
name: Publish docs.
defaults:
run:
working-directory: python
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
5 changes: 0 additions & 5 deletions python/docs/build.sh

This file was deleted.

9 changes: 9 additions & 0 deletions scripts/build_py_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

# run from root directory
export DOCS_DIR=$(pwd)/python/docs
mkdir -p $DOCS_DIR/build

touch $DOCS_DIR/build/.nojekyll # Disable jekyll to keep files starting with underscores

sphinx-build -b html $DOCS_DIR/api-docs $DOCS_DIR/build/api-docs

0 comments on commit b722aaf

Please sign in to comment.