Repository navigation
chore(deps): bump the dependencies group across 1 directory with 7 updates #462
Workflow file for this run
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: Documentation | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: pages-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build Sphinx docs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - uses: prefix-dev/[email protected] | |
| with: | |
| cache: true | |
| cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} | |
| environments: docs | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install sphinx-rustdocgen | |
| run: cargo install sphinx-rustdocgen --locked || cargo install sphinx-rustdocgen | |
| - name: Docs venv with sphinxcontrib-rust | |
| run: | | |
| set -euo pipefail | |
| # Keep the native Sphinx extension on the runner's Rust/C linker. | |
| python3 -m venv .venv-docs | |
| .venv-docs/bin/pip install -U pip | |
| .venv-docs/bin/pip install \ | |
| 'sphinx>=9,<10' \ | |
| 'shibuya>=2025.12.13,<2026' \ | |
| 'sphinx-sitemap>=2.9,<3' \ | |
| 'sphinx-copybutton>=0.5.2,<1' \ | |
| 'sphinx-design>=0.6,<1' \ | |
| 'sphinxcontrib-rust>=1,<2' \ | |
| 'sphinx-rustdoc-postprocess>=0.1,<0.2' | |
| .venv-docs/bin/python -c 'import sphinxcontrib_rust; print("ok")' | |
| - name: Build documentation | |
| run: pixi run -e docs docbld | |
| env: | |
| EB_STACK_DOCS_PYTHON: ${{ github.workspace }}/.venv-docs/bin/python | |
| - name: Assert version-one CLI and Rust API docs | |
| run: | | |
| set -euo pipefail | |
| # Sphinx splits code literals into per-word <span class="pre"> elements, | |
| # so multi-word phrases only exist in the tag-stripped text. | |
| cli_text=$(sed -e 's/ / /g' -e 's/<[^>]*>//g' docs/build/reference/cli.html) | |
| grep -q 'package plan' <<<"$cli_text" | |
| grep -q 'campaign run' <<<"$cli_text" | |
| grep -q 'eb_package_plan' <<<"$cli_text" | |
| grep -q 'eb-stack mcp' <<<"$cli_text" | |
| # In-site Rust API | |
| test -f docs/build/reference/rust-api.html | |
| test -f docs/build/crates/eb_stack/lib.html | |
| grep -q 'plan_new_package' docs/build/crates/eb_stack/lib.html | |
| test -f docs/build/reference/package-bundles.html | |
| test -f docs/build/reference/targets.html | |
| test -f docs/build/reference/campaigns.html | |
| scripts/check-doc-links.sh docs/build | |
| # light/dark logos present | |
| test -f docs/build/_static/logo-light.svg | |
| test -f docs/build/_static/logo-dark.svg | |
| grep -q logo-light docs/build/index.html || grep -q logo-dark docs/build/index.html || true | |
| - name: Install lychee | |
| uses: taiki-e/[email protected] | |
| with: | |
| tool: [email protected] | |
| - name: Link check (lychee) | |
| run: lychee --config lychee.toml --no-progress 'docs/build/**/*.html' README.md | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload docs artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: sphinx-docs | |
| path: docs/build | |
| deploy: | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' && github.repository == 'HaoZeke/eb-stack' | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Download docs artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: sphinx-docs | |
| path: docs/build | |
| - name: Deploy to Cloudflare Pages | |
| uses: cloudflare/wrangler-action@v4 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| command: pages deploy docs/build --project-name=eb-stack-docs --branch=main |