Repository navigation
feat(stack): write the solved dependency DAG as Graphviz DOT #607
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: llms.txt matches the Org manual | |
| run: python3 scripts/gen-llms-txt.py --check | |
| - 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 | |
| # Org export must have written the master document. The Sphinx | |
| # script refuses to run without it; keep the check here so a | |
| # workflow change cannot skip it. | |
| test -s docs/source/index.rst | |
| # 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 | |
| test -f docs/build/sitemap.xml | |
| grep -q 'tutorial' docs/build/sitemap.xml | |
| test -f docs/build/robots.txt | |
| grep -q 'Sitemap: https://eb-stack.rgoswami.me/sitemap.xml' docs/build/robots.txt | |
| grep -q 'name="description"' docs/build/index.html | |
| grep -q 'rel="describedby"' docs/build/index.html | |
| grep -q 'rel="alternate" type="text/markdown"' docs/build/tutorial.html | |
| test -f docs/build/llms.txt | |
| test -f docs/build/llms-full.txt | |
| test -f docs/build/tutorial.html.md | |
| test -f docs/build/reference/mcp.html.md | |
| - name: Install lychee | |
| uses: taiki-e/install-action@v2 | |
| 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 |