Repository navigation
ci: build the documentation site in CI and configure its Netlify deployment - #531
Open
dupontbertrand wants to merge 3 commits into
Open
dupontbertrand wants to merge 3 commits into
dupontbertrand wants to merge 3 commits into
Conversation
…backend
The site did not build on release-3.1.0: `vitepress build` stopped on
dead links (the /repo pages that `docs:init` is supposed to link, and
relative ./packages/* links in the architecture page), `docs:init`
itself failed because source/repo/ does not exist in the repository,
and the pages linked from the repository root (README, HISTORY) made
Vue choke on the {{mustaches}} in their inline code. Three pages still
carried Hexo tags ({% apibox %}, {% dtdd %}, {% changelog %}, {% raw %})
that VitePress prints verbatim.
- api/templates.md: every {% apibox %} becomes a heading with the
signature, the summary and the arguments from the JSDoc, keeping the
anchors Hexo generated (Template-events, Blaze-TemplateInstance-findAll,
...) so existing deep links keep working; the {% dtdd %} lists become
Markdown lists; the event object section covers both DOM backends.
- changelog.md includes HISTORY.md directly instead of the Hexo tag.
- Inline code gets v-pre through a markdown-it rule, as fenced blocks
already do, so {{...}} in backticks is no longer interpolated.
- docs:init creates source/repo and links only the three files the site
references, instead of every Markdown file at the repository root.
- Dead links fixed in dev/architecture.md and guide/testing.md; the
"Edit this page" pattern pointed at site/sources/.
The migration guide said jQuery was removed; it is optional, and Blaze
keeps using it when the jquery package is present. The guide now says
so and lists what changes without jQuery. The JSDoc, the generated API
page and the TypeScript declaration of TemplateInstance.$ describe both
return types (jQuery object or array of elements).
…oyment blazejs.org is a Netlify site that still serves the Hexo build of master, frozen before 3.0.2: the Hexo 3.9 toolchain no longer builds on a current Node (every page fails with "isDate is not a function"), and nothing in the repository tells Netlify how to build the VitePress site that replaced it on release-3.1.0. The GitHub Pages workflow added with the migration never ran: it listens to a `main` branch that does not exist, Pages is disabled on the repository, and the workflow only exists on the release branch while GitHub registers workflows from the default branch. - netlify.toml: base `site`, the three build commands, publish `.vitepress/dist`, Node 22. Netlify reads this file before its UI settings, so the first push of the VitePress site to master deploys it, and pull requests get deploy previews again if the site is still linked to the repository. - .github/workflows/docs.yml: installs the site, links the repository pages, regenerates the API pages and fails when they differ from the committed ones, then builds the site. Runs on pull requests and on pushes to master. - deploy.yml removed. It cannot work as it is, and the maintainers said in meteor#494 they prefer Netlify. - The documentation toolchain is pinned to exact versions, since the repository ignores package-lock.json and the generated API pages must come out identical in CI and locally. - site/README.md describes the VitePress commands instead of Hexo.
Collaborator
|
@nachocodoner @italojs do you have access to the netlify build/configuration etc. and check if this PR would be solving the build issue for our next docs? We have switched to Vitepress but its not yet "active" but will be picked up by CI, once #492 is merged. Edit: apparently the build is already successful - https://github.com/meteor/blaze/actions/runs/42372903664/job/128404506885 we only do not know where to view the results for this non-official build |
The site config kept `base: '/blaze/'` from the GitHub Pages preview of meteor#494, so every asset and internal link of a build came out under `/blaze/`, a path blazejs.org does not serve. The logo files also stayed in `site/source/logo/`, their Hexo location, which VitePress does not copy into the build: the logo, the favicon and the home page image were missing from the output while the dev server kept serving them. Set the base to `/` and move the logo folder under `site/source/public/`.
This branch has not been deployed
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.
Builds on #530, which makes the site build at all; the first commit here is that one. This PR is the CI item of the documentation review asked in #492.
What is broken today
blazejs.netlify.app) serving the Hexo build ofmaster. Its changelog page stops at v3.0.1 (November 2024): 3.0.2 and 3.0.3 never reached it. The Hexo 3.9 toolchain does not build on a current Node anymore: on Node 26 every page fails withisDate is not a functionand only the four logo files come out.netlify.tomlin the repository, so the build settings live in the Netlify UI, where they still describe the Hexo build. The dayrelease-3.1.0reachesmaster, that build fails on apackage.jsonthat has nobuildscript, and the site stays frozen.deploy.ymllistens to amainbranch that does not exist, GitHub Pages is disabled on the repository (has_pages: false), and the file only exists onrelease-3.1.0while GitHub registers workflows from the default branch. In docs: migrate to vitepress #494 @jankapunkt wrote he has no access to the publishing side and @italojs said he prefers to stay on Netlify for the deploy previews.Changes
netlify.tomlat the repository root: basesite, commandnpm run docs:init && npm run docs:api && npm run docs:build, publish.vitepress/dist, Node 22. Netlify installs thesite/dependencies itself, and settings in this file take precedence over the UI, so the first push of the VitePress site tomasterdeploys it. Pull requests get deploy previews again, provided the Netlify site is still linked to this repository: that part can only be checked from the Netlify side..github/workflows/docs.yml, on pull requests and pushes tomaster: install,docs:init,docs:api, thengit diff --exit-code -- site/source/apiso a JSDoc change that was not regenerated into the committed API pages fails the check, thendocs:build, which fails on dead links and on pages Vue cannot compile.deploy.ymlremoved. If the TSC prefers GitHub Pages over Netlify, it needs Pages enabled on the repository and the DNS moved anyway, so it is better restored on purpose than kept broken.site/package.jsonpinsvitepress,jsdocandjsdoc-to-markdownto the versions in use today. The repository ignorespackage-lock.json, so the ranges were the only thing fixing the toolchain, and the generated API pages have to come out identical in CI and locally for the check above to hold.site/README.mddocuments the VitePress commands instead of the Hexo ones.site/.vitepress/config.mtssetsbaseto/: the/blaze/value came from the GitHub Pages preview of docs: migrate to vitepress #494 and sent every asset and internal link of a build under a path blazejs.org does not serve. The logo files move fromsite/source/logo/, their Hexo location, tosite/source/public/logo/, the only folder VitePress copies into the build; the dev server served them from the old place, which is why the preview looked fine.Verification
git diff --exit-codeonsite/source/apiis empty, build succeeds.netlify.tomlparses, and its paths follow the Netlify rule that paths are relative to the base directory.Docscheck on this PR is the workflow itself.Not covered
Whether the Netlify site is still connected to this repository with automatic builds on, and which branch it builds. Someone with access to the Netlify account (@italojs, @nachocodoner) needs to confirm that; nothing in the repository can.