This repository contains the source and automated preview generation pipeline for the https://bazel.build/ website.
Most changes to https://bazel.build/ should be made in the bazelbuild/bazel repository.
See Bazel's Docs contribution workflow for more information on how to make changes to Bazel's documentation site.
Agent skills for fixing bazel.build migration bugs live in agent-skills/.
See AGENTS.md for manager/worker workflows and Mintlify preview verification.
-
Clone the
bazel-docsproject:git clone https://github.com/bazel-contrib/bazel-docs.git && cd bazel-docsWARNING: Do not clone with
--recurse-submodulesor it will break the local preview generation. If you accidentally initialize the upstream submodule, you can deinitialize it withgit submodule deinit -f --all. -
If you haven't already, install npm.
-
Launch a local preview server with the following command:
npx mint devExample output
$ npx mint dev Need to install the following packages: mint@4.2.679 Ok to proceed? (y) y ✓ preview ready local → http://localhost:3000 network → http://192.168.1.4:3000 press ctrl+c to exit the preview
Each branch pushed to this repo is automatically deployed by Mintlify at https://bazel-<branch-name>.mintlify.app. No additional configuration is required for preview deployments — the branch name determines the subdomain.
Files listed in .mintignore (gitignore syntax) are excluded from Mintlify rendering. Add files there when they contain MDX syntax errors that block deployment.
The preview workflow (preview-bazel-docs-pr.yml) polls bazelbuild/bazel on a schedule for recently-updated open PRs targeting master/main that modify documentation or reference-doc inputs. For each matching PR, it:
- Creates or updates a
pr-<N>branch and draft PR in this repo with the PR's docs. - Mintlify deploys that branch at
https://bazel-pr-<N>.mintlify.app. - Posts (or updates) a comment on the upstream PR with the preview link and changed pages.
The preview workflow can be triggered manually from the GitHub Actions UI via workflow_dispatch (with pr_number) without waiting for the scheduled run.
- The
upstreamGit submodule tracksbazelbuild/bazel. - Dependabot opens a daily PR bumping
upstreamto the latestbazelbuild/bazelcommit, triggeringdependabot-automerge.yml. - The sync workflow (
pull-from-bazel-build.yml):- Copies
.mdxfiles and assets fromupstream/docs/directly into this repo (propagating file deletions). - Builds reference documentation (Starlark/Java/CLI docs) via
bazel build //src/main/java/com/google/devtools/build/lib:gen_mdx_reference_docs, which produces MDX viadocs2mdx.py, and extractsmdx-reference-docs.zip. - Updates versioned navigation (
navigation.update.shandcleanup-deleted-docs.sh), commits the result, and pushes to the PR branch before squash auto-merging intomain.
- Copies
- Mintlify picks up the merge to
mainand deploys the updated docs site at https://bazel.build/.- Files listed in
.mintignoreare excluded from Mintlify rendering. These are files with MDX syntax that cannot yet be auto-fixed (see #226).
- Files listed in