Skip to content

chore(gh): remove the legacy GitHub Pages build tooling #5212

Closed

Description

@dan-petty

Problem or Motivation

#5183 (closes #5152) moved the docs site from Jekyll to Zensical. The Pages source of the repository is now GitHub Actions, and .github/workflows/pages.yml is the one deploy path. But some commands, text and tests still serve the legacy branch-source build. On 2026-11-12 the owner said: "no need for old redirects, clean up legacy tooling and workflows and configs".

Evidence at origin/main 8fdeea0 (GET requests through uv run devops gh api):

  • repos/dan-petty/devops-cli/pages gives "build_type":"workflow" and "source":{"branch":"main","path":"/docs"}. GitHub does not use source for a workflow build.
  • repos/dan-petty/devops-cli/pages/builds stops at f4b1d73 (2026-11-12T17:29:45Z). That record is the last run of the GitHub-managed workflow pages-build-deployment (id 352778591). After it, pages.yml deployed 490513f, 6ef4336, ed1d2e2, 64b7199 and aeb33d6. None of these deploys is in /pages/builds. The github-pages deployments continue to 8fdeea0 (18:52:36Z).
  • .github/workflows/pages.yml:28 has workflow_dispatch:. A manual run of pages.yml replaces a manual build request.

The legacy items:

  1. devops gh pages build (src/devops_cli/commands/gh.py:1114-1134) and the MCP tool gh_pages_build (src/devops_cli/config/constants.py:360) send POST repos/{repo}/pages/builds. This endpoint requests a build from the branch source.
  2. devops gh pages builds (src/devops_cli/commands/gh.py:1080-1111) reads GET repos/{repo}/pages/builds. The list holds only legacy builds, so the command shows an old history as the current history.
  3. devops gh pages status prints "Source Branch: main (path: /docs)" next to "Build Type: workflow" (src/devops_cli/commands/gh.py:1072). GitHubPagesInfo sets the legacy defaults build_type="legacy", branch="main" and path="/" when the API omits a field (src/devops_cli/github/pages.py:27-29,73-75).
  4. Text teaches the legacy build or names the deleted Jekyll files (see "Correct the text" below).
  5. tests/github/test_github_pages.py:217-226 also asserts that docs/ holds no *.y*ml file, as a guard against a returned Jekyll settings file. AGENTS.md rule 11 permits such a guard only when an outside constraint blocks the fix. No constraint applies. Also, pathlib glob matches dot files, so the guard refuses a correct docs/.nav.yml.

Redirects: no file links to an old page address (*.html), and zensical.toml has no redirect plugin. This change adds no redirect.

Proposed Solution & Architectural Design

The project is alpha: delete the old path and add no shim. Plan the change in openspec/changes/<issue>-remove-the-legacy-pages-build-tooling/, and record the evidence above in ## Feasibility.

Delete the legacy build commands

  • src/devops_cli/github/pages.py:35-45,85-125,128-144: delete GitHubPagesBuildInfo, _parse_single_build, pages_builds_args, pages_builds_requests, get_pages_builds, pages_build_args, pages_build_requests and request_pages_build. Remove the imports that become unused (Any, ConfigDict, Field).
  • src/devops_cli/commands/gh.py:71,73,74,76,1080-1134: delete pages_builds_cmd, pages_build_cmd and their imports.
  • src/devops_cli/lang/en/help.py:1250-1251: delete pages_builds and pages_build.
  • src/devops_cli/config/constants.py:360: delete the MCP exposure row ("gh", "pages", "build"). Keep rows 361 (status) and 362 (verify).
  • tests/fixtures/swallowed_failures_ceilings.json:79: the deletion removes the except Exception at pages.py:123. Lower the ceiling of pages.py from 2 to 1 with the --lower command of tests/gate/swallowed_failures.py:28-31, in the same commit. Do not edit the file by hand.
  • Tests: delete tests/github/test_github_pages.py:62-75,110-139 and the imports at lines 14, 16 and 18. Delete tests/commands/test_gh_cmd.py:151-167. In tests/github/test_gh_project_views_pages_dry_run.py, delete lines 24-25, 38-39, 164-165 and 186-193 (REQUEST_PLAN_COMMANDS goes from 10 to 8 rows). Delete "gh_pages_build" at tests/ai/mcp/test_mcp_tool_registry.py:169.

Correct devops gh pages status

Write the tests first (AGENTS.md rule 4).

  • src/devops_cli/github/pages.py:22-32,60-82: build_type, branch and path default to None. Do not invent legacy values. Keep the build_type field, because feat(roadmap): a Pages health step finds deploy faults and missing pages #5154 reads it.
  • src/devops_cli/commands/gh.py:1068-1077: print "Source Branch" only when build_type is legacy. For workflow, print that a GitHub Actions workflow deploys the site.
  • src/devops_cli/commands/gh.py:1056 and src/devops_cli/lang/en/help.py:1244-1249: remove "branch" and "builds" from the help, for example "Inspect GitHub Pages deployment status, URL, build type, and HTTPS enforcement."
  • src/devops_cli/ai/mcp/server.py:190: remove "build health" from the docstring of resource://gh/pages/status. At lines 457-459, remove the fixed tool count "151". The count is already wrong, and this change makes it change again.
  • src/devops_cli/github/pages.py:1: the module docstring says "build lifecycle". Change it to "GitHub Pages site status and local verification of the docs site settings."
  • Tests: change the payloads at tests/github/test_github_pages.py:46-59,77-97 and tests/commands/test_gh_cmd.py:132-148 from build_type legacy to workflow. Add one case for each build type.

Correct the text

  • src/devops_cli/ai/knowledge_base/devops_cli/tasks/github_project_management.md:
    • Delete lines 50-54 (the two commands). Add the manual deploy: devops gh api -X POST 'repos/{owner}/{repo}/actions/workflows/pages.yml/dispatches' -f ref=main.
    • Line 6: remove "build history, manual build dispatching".
    • Line 21: the arrow to the deployment is pages.yml: devops docs site build --strict, not devops gh pages verify.
    • Line 131: remove "publishing root". Say that docs/ holds Markdown pages.
    • Line 132: the API field is https_enforced, not enforce_https.
    • Line 183: remove gh_pages_build. Line 192: remove "build health".
  • docs/ROUTINE_TASKS.md:142: replace "the docs/ publishing root" with "that docs/ holds Markdown pages". "Publishing root" is a term of the branch source.
  • docs/DESIGN.md:78: the docs site CSS with color literals was the deleted docs/assets/css/style.css. Say that feat(docs): build the docs site theme from the design tokens #4745 extends the rule to the extra_css file that it adds.
  • docs/KNOWN_ISSUES.md:34: change {% raw %}${{ secrets.* }}{% endraw %} to ${{ secrets.* }}. Zensical and GitHub do not run Liquid, so the tags show as text.
  • README.md:40: on the Zensical site, README.md is the home page and docs/index.md is the Guides overview (.nav.yml:5-8). Change the label to "Documentation Overview (docs/index.md)". This line is not in the command matrix of docs(cli): turn CLI_REFERENCE into an index of the command group pages #5163.
  • docs/adr/0024-the-project-owns-its-design-tokens-in-the-dtcg-format-and-style-dictionary-builds-them.md: add an amendment line under the title, in the form of ADR 0012:5: "Amended on 2026-11-12 (#5152): Zensical builds the docs site, not Jekyll. The site build does not run Style Dictionary, so decision 4 holds." Do not change line 20.
  • tests/github/test_github_pages.py:217-226: keep the verify_pages_configuration(REPO_ROOT) assertion. Remove the docs/*.y*ml assertion and the Jekyll sentence of the docstring.

OpenSpec deltas

  • command-dry-run-class: MODIFIED requirement gh-project-views-pages-request-plans. "ten" becomes "eight". The scenario "Dry run on gh pages build" becomes "Dry run on gh pages status" with devops gh pages status --dry-run.
  • github-pages: ADDED requirement. devops gh pages status shows the source branch only for a legacy build.

Regenerate (never edit by hand)

  • uv run devops docs generate: docs/MCP_TOOLS.md, docs/commands/gh.md and docs/CLI_REFERENCE.md.
  • uv run pytest tests/ai/mcp/test_mcp_tool_listing.py --snapshot-update --snapshot-file-lock: the MCP listing snapshot.

Out of scope

  • docs(cli): turn CLI_REFERENCE into an index of the command group pages #5163 owns the README command matrix, devops docs --sync-readme and the form of docs/CLI_REFERENCE.md. The matrix lists only the group devops gh pages, so this change does not touch it.
  • feat(docs): build the docs site theme from the design tokens #4745 owns the token CSS of the docs site and its map to the Zensical theme.
  • Records stay as they are: CHANGELOG.md, the superseded ADRs 0010, 0011 and 0012, docs/agent/archive/, openspec/changes/archive/ and the frozen fixtures in tests/fixtures/.
  • .github/workflows/docs-site.yml:73-85 ("Verify Built Site Pages") stays. The spec github-pages (lines 23-31) requires it, and it passed on the Zensical builds.

Target Subsystem

SDLC, Git & PR Governance (devops gh pages, the docs site and the knowledge base).

Existing Tool Considered

  • The GitHub Actions workflow_dispatch of .github/workflows/pages.yml replaces devops gh pages build.
  • The GitHub REST endpoints actions/workflows/pages.yml/runs and deployments?environment=github-pages replace devops gh pages builds. devops gh api sends them under the rate limiter.
  • This change builds nothing, so it has no build cost. A short command for the deploy history (for example devops gh run list --workflow, the gh name) is a separate item if a person asks for it.

Acceptance Criteria

  1. uv run devops gh pages --help lists only status and verify.
  2. git grep -n -E 'pages_builds?\b|request_pages_build|get_pages_builds|GitHubPagesBuildInfo' -- src tests docs openspec/specs ':!docs/agent/archive' returns nothing.
  3. git grep -n -E 'gh pages builds?\b|pages/builds' -- . ':!CHANGELOG.md' ':!openspec/changes/archive' ':!docs/agent/archive' ':!tests/fixtures' ':!tests/github/test_github_rate_limiter.py' returns nothing.
  4. git grep -n -i jekyll -- . ':!CHANGELOG.md' ':!openspec/changes/archive' ':!docs/adr' ':!docs/agent/archive' ':!tests/fixtures' returns nothing.
  5. git grep -n -E '\{%-? ?(end)?raw' -- . ':!CHANGELOG.md' ':!openspec/changes/archive' returns nothing.
  6. git grep -n -i -E 'publishing root|enforce_https|build health|build history|manual build dispatching' -- src docs ':!docs/agent/archive' returns nothing.
  7. uv run devops gh pages status --repo dan-petty/devops-cli prints "Build Type: workflow" and no "Source Branch" line.
  8. uv run pytest tests/github/test_github_pages.py tests/commands/test_gh_cmd.py tests/github/test_gh_project_views_pages_dry_run.py tests/github/test_github_contract.py tests/ai/mcp tests/docs/test_docs_knowledge_base_argv.py passes. The status tests hold one case for workflow and one for legacy.
  9. uv run devops ci --check --only swallowed-failures passes, and tests/fixtures/swallowed_failures_ceilings.json gives src/devops_cli/github/pages.py the ceiling 1.
  10. uv run devops docs check and uv run devops openspec check pass. After uv run devops docs generate, git status --porcelain -- docs is empty.
  11. git diff origin/main -- 'docs/adr/0024-*.md' shows only added lines, and one added line is the amendment that names feat(docs): move the docs site to Zensical with a full nav and version #5152.
  12. The required checks and the Docs Site Build check (docs-site.yml) pass on the pull request. After the merge, uv run devops gh api 'repos/dan-petty/devops-cli/actions/workflows/pages.yml/runs?branch=main&per_page=1' --jq '.workflow_runs[0].conclusion' prints success.

Related

Source: #5152

Activity

  1. added
    source/agent
    on Nov 12, 2026
  2. added
    type/chore
    scope/gh
    status/new
    value/medium
    effort/medium
    on Nov 12, 2026
  3. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor
    • Priority: P3-Low. Cleanup of dead code that misleads users but does not block a workflow or break a build.
    • Related: ci(pages): build the docs site from a workflow with a docs filter #4656, which asks for a different change. Both concern GitHub Pages build paths; #4656 added the workflow build, this candidate removes the now-obsolete branch-build commands.
  4. added
    priority/p3-low
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 12, 2026
  5. removed
    status/in-review
    owner/agent
    on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p3-lowscope/ghsource/agenttype/chorevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions