Skip to content

Update api spec

Update api spec #182

Workflow file for this run

name: Deploy Documentation to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
push:
branches: [main]
paths:
- 'docs/**'
- 'kittycad/**'
- '.github/workflows/docs.yml'
- pyproject.toml
- uv.lock
pull_request:
branches: [main]
paths:
- 'docs/**'
- 'kittycad/**'
- '.github/workflows/docs.yml'
- pyproject.toml
- uv.lock
jobs:
# Build job
build:
runs-on: ubuntu-latest-8-cores
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Install dependencies
run: |
sudo apt update && sudo apt install -y \
enchant-2 \
--no-install-recommends
# Install dependencies and the package itself for autodoc
uv sync --extra docs
- name: Build documentation
run: |
# Clean up any existing build artifacts
rm -rf docs/html docs/_build docs/_autosummary
# Build the documentation
uv run sphinx-build -b html docs/ docs/html/
# Add CNAME for custom domain
echo "python.api.docs.zoo.dev" > docs/html/CNAME
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/html
# Deploy job (only on main branch pushes)
deploy:
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest-8-cores
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4