Fix repo slug in great-docs.yml: tidy-draws → tidydraws #11
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: CI Docs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| deploy: | |
| description: "Publish the built site to GitHub Pages" | |
| type: boolean | |
| default: false | |
| # The repo is private and the docs are under review, so the site is NOT | |
| # auto-published yet. `build-docs` runs on every push/PR to catch breakage. | |
| # `publish-docs` only runs on manual `workflow_dispatch` with `deploy=true`. | |
| # Once the doc review pass is complete, flip the publish trigger to | |
| # `if: github.ref == 'refs/heads/main'` (tracked in the go-live issue). | |
| jobs: | |
| build-docs: | |
| name: "Build Docs" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Full history for accurate page timestamps | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.2.0 | |
| - name: Install package and dependencies | |
| # uv sync installs the locked dependency set from uv.lock, so CI | |
| # resolves the exact versions used in local dev. | |
| run: uv sync --all-extras | |
| - name: Register `python3` Jupyter kernel | |
| # .qmd files (and great-docs.yml) declare `jupyter: python3`, so the | |
| # CI runner needs a kernelspec under that name pointing at the same | |
| # Python interpreter the package was installed into above. | |
| run: uv run python -m ipykernel install --user --name python3 | |
| - name: Set up Quarto | |
| uses: quarto-dev/quarto-actions/setup@v2 | |
| - name: Build docs | |
| run: uv run great-docs build | |
| - name: Verify agent-context files were generated | |
| # great-docs writes llms.txt / llms-full.txt / skill.md at build step, | |
| # but llms-full.txt is only emitted if `import tidydraws` succeeds and | |
| # that failure is swallowed. Assert the files landed in _site so a | |
| # silent skip fails CI instead of shipping an incomplete site. | |
| run: | | |
| for f in llms.txt llms-full.txt skill.md; do | |
| if [[ ! -s "great-docs/_site/$f" ]]; then | |
| echo "::error::great-docs/_site/$f missing or empty after build" | |
| exit 1 | |
| fi | |
| echo "OK: $f ($(wc -c < "great-docs/_site/$f") bytes)" | |
| done | |
| - name: Save docs artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docs-html | |
| path: great-docs/_site | |
| publish-docs: | |
| name: "Publish Docs" | |
| runs-on: ubuntu-latest | |
| needs: "build-docs" | |
| if: github.event_name == 'workflow_dispatch' && inputs.deploy | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: docs-html | |
| path: great-docs/_site | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: great-docs/_site | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |