Skip to content

Switchyard lets LLM applications route traffic across models and providers while preserving native OpenAI and Anthropic API compatibility - enabling flexible model selection, benchmarking, and cost/performance optimization.

Rust

docs(ci): publish libsy rustdoc previews (#254)

nachiketb-nvidiaaac511923937
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d37e49106..4e96fa177 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -20,11 +20,11 @@ jobs:
permissions:
pull-requests: read
outputs:
- full_ci: ${{ github.event_name != 'pull_request' || steps.filter.outputs.full_ci == 'true' }}
+ full_ci: ${{ github.event_name != 'pull_request' || (!startsWith(github.event.pull_request.title, 'docs') && steps.filter.outputs.full_ci == 'true') }}
steps:
- name: Detect non-documentation changes
id: filter
- if: github.event_name == 'pull_request'
+ if: github.event_name == 'pull_request' && !startsWith(github.event.pull_request.title, 'docs')
uses: dorny/paths-filter@v4
with:
predicate-quantifier: every
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index d8611564a..0f07c1727 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -8,6 +8,11 @@ on:
- "mkdocs.yml"
- "pyproject.toml"
- "uv.lock"
+ - "Cargo.toml"
+ - "Cargo.lock"
+ - "rust-toolchain.toml"
+ - "crates/libsy/**"
+ - "crates/protocol/**"
- ".github/workflows/docs.yml"
push:
branches: [main]
@@ -17,6 +22,11 @@ on:
- "mkdocs.yml"
- "pyproject.toml"
- "uv.lock"
+ - "Cargo.toml"
+ - "Cargo.lock"
+ - "rust-toolchain.toml"
+ - "crates/libsy/**"
+ - "crates/protocol/**"
- ".github/workflows/docs.yml"
# Cancel superseded PR runs; keep main builds so gh-pages writes don't race.
@@ -44,6 +54,12 @@ jobs:
- run: uv sync --only-group docs --locked
- name: Build documentation
run: uv run --only-group docs mkdocs build --strict
+ - name: Build libsy crate documentation
+ run: cargo doc --locked --no-deps --package switchyard-libsy
+ - name: Add crate documentation to site
+ run: |
+ mkdir -p site/rust
+ cp -R target/doc/. site/rust/
- name: Upload site artifact
uses: actions/upload-artifact@v4
with: