DataDesigner/.github/workflows/build-docs.yml
Johnny Greco ae0665fa16
refactor: slim package refactor into three subpackages (#240)
* remove old structure

* major shuffle

* streamline project configs

* update make commands

* updates to make commands

* remove essentials

* initialize logger in interface

* uv lock

* ignore notepad

* update workflows

* fix e2e project config

* generate colab notebooks

* resolve default model settings in interface

* fix build commands

* update perf import make command

* cleaning up some slop

* update recipes

* move conftest files to tests/

* update subpackage readmes

* streamline config_logging

* use exports

* update perf import usage pattern

* update for IDE behavior with ruff

* remove engine's fixtures file

* add note to about lazy imports

* update dependencies

* update docs

* doc fixes

* uv lock

* updates to catch up with main

* clean up makefile

* remove package gitignores

* define deps only once

* isolate tests

* add test for protetion rule

* create temp dirs for isolated tests

* catch up to main

* update headers

* re apply changes

* better result summaries for isolated tests

* move exports into top-level init

* fix client importlib version syntax

* catch up with main
2026-01-27 13:53:20 -05:00

68 lines
2.4 KiB
YAML

name: Build docs
on:
workflow_dispatch:
release:
types:
- published
jobs:
build-notebooks:
uses: ./.github/workflows/build-notebooks.yml
secrets: inherit
deploy:
needs: build-notebooks
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.9.5"
- name: Set up Python
run: uv python install 3.11
- name: Install dependencies for docs
run: uv sync --all-packages --group docs
- name: Download artifact from previous step
uses: actions/download-artifact@v5
with:
name: notebooks
path: docs/notebooks
- name: Find the latest existing release tag
id: get_release
run: |
if [ "${{ github.event_name }}" == "release" ]; then
LATEST_TAG="${{ github.event.release.tag_name }}"
else
echo "::notice::Running manually via workflow_dispatch. Fetching latest release tag..."
gh auth status || echo "GitHub CLI is not authenticated, relying on GITHUB_TOKEN."
# We use tr -d '\n' to remove the trailing newline for a clean tag string
LATEST_TAG=$(gh release view --json tagName -q .tagName 2>/dev/null)
if [ -z "$LATEST_TAG" ]; then
echo "::error::Could not find the latest published release tag. Ensure a release exists."
exit 1
fi
fi
echo "Latest release tag found: $LATEST_TAG"
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Extract version from release tag
run: |
# Remove the 'v' prefix and any suffix after a space
VERSION=$(echo ${{ env.LATEST_TAG }} | sed 's/^v//' | sed 's/ .*$//')
echo "::notice::Extracted version: $VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Setup doc deploy
run: |
git fetch origin gh-pages --depth=1
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Build and deploy docs
run: uv run mike deploy --push --update-aliases ${{ env.VERSION }} latest