Make templates docs preview a minimal prebuilt build (fixes 15k-file upload cap) - #101
Merged
Conversation
Rework the templates docs preview to mirror the PyRel repo's docs preview: - Build the docs site locally with the Vercel CLI (vercel build) and deploy the prebuilt output with 'vercel deploy --prebuilt --archive=tgz', replacing 'aldenquimby/deploy-to-vercel-action@v2'. The tarball upload sidesteps Vercel's 15,000-file cap that was failing the previous source upload. - Make it a minimal build with no API reference docs: PRIVATE=true, SKIP_API_ARTIFACTS=true (skip committed Python/CLI artifacts), and IS_PYREL_PR=true (reuse the docs build's lever to skip generating the 'latest' API reference). Only the templates gallery is needed. - Point the PR preview comment directly at /build/templates. Refs #91.
The Vercel project install command runs 'uv venv --python 3.13 && uv pip install .', so the runner needs uv on PATH. Replace the actions/setup-python step with astral-sh/setup-uv (+ uv python install 3.13), matching PyRel. Fixes 'uv: not found' (exit 127) during 'vercel build'.
|
The templates docs preview for this pull request has been deployed to Vercel!
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
�]633;E;printf 'Closes #91\n\n';b876e6c5-e170-48d7-983e-40b94debad4c��]633;C�Closes #91
Source and scope
The
previewjob on this repo's PRs has been failing repo-wide (tracked in #91) with:The old step deployed through
aldenquimby/deploy-to-vercel-action@v2, which uploads the entirerelationalai-docsworking directory as loose files. That set (the docs site, itsnode_modules, ~24.7k committed API-reference artifacts, and the synced templates) now exceeds Vercel's hard 15,000-file upload cap, so the deploy fails before it starts. The action exposes no way to pass Vercel's own--archive=tgzsuggestion.This PR reworks the templates docs preview to behave like the PyRel repo's docs preview (
relationalai/pyrel→.github/workflows/docs-preview.yml): build locally and upload a prebuilt tarball. It fully resolves #91 for this repo and makes the preview a minimal, templates-only build.What changed
Rewrote
.github/workflows/docs-preview.yml:vercel buildthenvercel deploy --prebuilt --archive=tgz. Only the built output is uploaded, as a single tarball, so the file-count cap no longer applies.PRIVATE=true,SKIP_API_ARTIFACTS=true(skip composing the committed Python/CLI API-reference artifacts), andIS_PYREL_PR=true(reuse the docs build's existing lever to skip generating the "latest" API reference). The templates gallery is the only thing the preview needs.…/build/templates.Why
Before: every PR's
previewwas red because the loose-file upload exceeded Vercel's 15k cap, and the build also produced the full docs site (including all API reference) even though templates PRs only need the gallery.After: the preview builds a minimal private site (no API reference), uploads a prebuilt tarball that stays well under the cap, and comments a link that lands the reviewer directly on the templates page.
Risks
IS_PYREL_PRflag: this is the only existing docs-build lever that skips "latest" API-reference generation; using it here is functional but a misnomer. A follow-up could add a template-neutral flag (e.g.SKIP_LATEST_API_DOCS) to therelationalai-docsbuild./api/...will 404 in the preview only. That's expected for a templates preview.ubuntu-latestwithNODE_OPTIONS=--max-old-space-size=6144; if the private build OOMs, the runner/heap may need bumping (PyRel uses a larger runner for its full build).How to verify
previewcheck: theDeploy Preview to Vercelstep should complete without thefiles should NOT have more than 15000 itemserror.<preview-url>/build/templatesand that the page renders the templates gallery.RAI_TEMPLATES_REPO_BRANCH).