docs(mkdocs): publish API docs site to GitHub Pages - #33
Open
Abhishek Patil (abhishek-pattern) wants to merge 2 commits into
Open
docs(mkdocs): publish API docs site to GitHub Pages#33Abhishek Patil (abhishek-pattern) wants to merge 2 commits into
Abhishek Patil (abhishek-pattern) wants to merge 2 commits into
Conversation
Set up a Material for MkDocs site over the existing `docs/` markdown and wire it to GitHub Pages. - `mkdocs.yml`: Material theme with light/dark palettes, nav covering the Metaflow API pages and admin/setup guides. - `scripts/mkdocs_hooks.py`: generates `index.md` from `README.md` at build time so the landing page has a single source of truth, rebasing its `docs/`-prefixed links and pointing "edit this page" at the README. - `.github/workflows/docs.yaml`: builds on PRs with `--strict` to catch dead internal links, deploys to Pages on `main`. Paths mirror the `paths-ignore` in the main CI workflow so the two do not overlap. - `pyproject.toml` / `uv.lock`: `docs` dependency group (mkdocs pinned <2, which drops the plugin system this site depends on) plus `docs-build` and `docs-serve` poe tasks. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot started reviewing on behalf of
Abhishek Patil (abhishek-pattern)
August 19, 2026 10:03
View session
Abhishek Patil (abhishek-pattern)
had a problem deploying
to
github-pages
August 19, 2026 10:04 — with
GitHub Actions
Failure
There was a problem hiding this comment.
Pull request overview
Sets up a MkDocs Material documentation site over the existing docs/ markdown and adds a GitHub Actions workflow to build (on PRs) and deploy (on main) the site to GitHub Pages.
Changes:
- Add
mkdocs.ymlconfiguring Material for MkDocs, navigation, and markdown extensions. - Add an MkDocs build hook to generate
index.mdfromREADME.mdat build time. - Add a Pages publish workflow plus a
docsdependency group and poe tasks for building/serving docs.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
uv.lock |
Adds locked dependencies required for MkDocs + Material and extensions. |
scripts/mkdocs_hooks.py |
Adds an MkDocs hook to generate index.md from README.md and adjust links/edit URI. |
pyproject.toml |
Adds a docs dependency group and poe tasks for building/serving the docs site. |
mkdocs.yml |
Defines the MkDocs Material site configuration (theme, nav, extensions, plugins, hooks). |
.github/workflows/docs.yaml |
Adds a workflow to build docs on PRs and deploy to GitHub Pages on main. |
Suppressed comments (3)
.github/workflows/docs.yaml:35
concurrencyis defined at the workflow level withgroup: pages, so it serializes all runs (including pull_request builds) across branches/PRs. This can unnecessarily queue PR doc builds behind unrelated runs. Consider moving concurrency to thedeployjob only, or keying the group by ref (e.g.,pages-${{ github.ref }}) while keepingcancel-in-progress: falsefor main deploys.
# One Pages deploy at a time. Do not cancel a deploy that is already publishing --
# a half-finished deploy would leave the live site in an inconsistent state.
concurrency:
group: pages
cancel-in-progress: false
.github/workflows/docs.yaml:61
- The Pages workflow is missing the
actions/configure-pagesstep that GitHub’s official Pages deployment examples include before uploading/deploying the artifact. Without it, deployments may be unreliable or unsupported. Add auses: actions/configure-pages@v5step (typically beforeupload-pages-artifact) and ensure the job has the permissions that step requires.
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: "${{ github.workspace }}/uv.lock"
# --strict turns broken internal links into a build failure, so a PR that
# renames a doc cannot silently ship a dead link. --frozen forbids uv from
# resolving anything not already pinned in uv.lock.
- name: Build Site
run: uv run --frozen --group docs mkdocs build --strict
- name: Upload Pages Artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v3
with:
path: ./site
pyproject.toml:163
docs-build/docs-serveuseuv run --group docs ...without--frozen, while CI’s docs workflow usesuv run --frozen --group docs ...to enforce the lockfile. Consider adding--frozento these poe tasks too so local builds match CI and don’t accidentally resolve outsideuv.lock.
[tool.poe.tasks.docs-build]
shell = "uv run --group docs mkdocs build --strict"
help = "Build the documentation site into ./site (fails on broken links)"
[tool.poe.tasks.docs-serve]
shell = "uv run --group docs mkdocs serve"
help = "Serve the docs with live reload on http://localhost:8000"
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+4
to
+16
| # The main CI workflow (ci-cd-ds-platform-utils.yaml) deliberately paths-ignores | ||
| # README.md and docs/**, so this workflow owns everything that feeds the docs site. | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - "README.md" | ||
| - "docs/**" | ||
| - "mkdocs.yml" | ||
| - "scripts/mkdocs_hooks.py" | ||
| - "uv.lock" | ||
| - ".github/workflows/docs.yaml" | ||
| pull_request: |
Comment on lines
+35
to
+36
| # mkdocs<2 is a hard pin: MkDocs 2.0 removes the plugin system and theming that | ||
| # mkdocs-material and our build hook rely on, with no migration path. |
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.
Set up a Material for MkDocs site over the existing
docs/markdown and wire it to GitHub Pages.mkdocs.yml: Material theme with light/dark palettes, nav covering the Metaflow API pages and admin/setup guides.scripts/mkdocs_hooks.py: generatesindex.mdfromREADME.mdat build time so the landing page has a single source of truth, rebasing itsdocs/-prefixed links and pointing "edit this page" at the README..github/workflows/docs.yaml: builds on PRs with--strictto catch dead internal links, deploys to Pages onmain. Paths mirror thepaths-ignorein the main CI workflow so the two do not overlap.pyproject.toml/uv.lock:docsdependency group (mkdocs pinned <2, which drops the plugin system this site depends on) plusdocs-buildanddocs-servepoe tasks.