chore: bump versions for release -- iii(iii/v0.11.0-next.5) #40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Generate API Docs | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'sdk/packages/**' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| generate: | |
| name: Generate SDK API Reference | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # ── Node.js ── | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| run_install: false | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| - run: pnpm install --frozen-lockfile | |
| # ── Python ── | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - uses: astral-sh/setup-uv@v5 | |
| # ── Rust (stable + nightly for rustdoc JSON) ── | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: dtolnay/rust-toolchain@nightly | |
| # Step 1a: Extract Node SDK docs (TypeDoc) | |
| - name: Extract Node SDK docs | |
| run: pnpm --filter iii-sdk docs:json | |
| # Step 1b: Extract Browser SDK docs (TypeDoc) | |
| - name: Extract Browser SDK docs | |
| run: pnpm --filter iii-browser-sdk docs:json | |
| # Step 2: Extract Python SDK docs (griffe) | |
| - name: Extract Python SDK docs | |
| working-directory: sdk/packages/python/iii | |
| run: | | |
| uv sync --extra dev | |
| uv run griffe dump iii -d google > api-docs.json | |
| # Step 3: Extract Rust SDK docs (nightly rustdoc JSON) | |
| - name: Extract Rust SDK docs | |
| run: cargo +nightly rustdoc -p iii-sdk --all-features -- -Z unstable-options --output-format json | |
| continue-on-error: true | |
| # Step 4: Generate MDX from extracted JSON | |
| - name: Generate MDX files | |
| run: pnpm tsx docs/scripts/generate-api-docs.mts | |
| # Step 5: Commit if changed | |
| - name: Commit generated docs | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add docs/content/api-reference/sdk-node.mdx \ | |
| docs/content/api-reference/sdk-browser.mdx \ | |
| docs/content/api-reference/sdk-python.mdx \ | |
| docs/content/api-reference/sdk-rust.mdx | |
| git diff --cached --quiet || git commit -m "docs: regenerate SDK API reference" | |
| git push |