Skip to content

ci(pages): build the docs site from a workflow with a docs filter #4656

Closed

Description

@dan-petty

Problem or Motivation

GitHub Pages publishes the site from the branch: the Pages API gives source main:/docs and build type legacy. The legacy builder runs on each push to main, also when the push changes no file under docs/. Today Pages adds about 3 jobs to each merge (one day of data).

The Docs Site Build check in .github/workflows/ci.yml already builds docs/ with the pinned image of actions/jekyll-build-pages v1.0.13 on PRs that change the site.

Owner decision O5 (2026-11-11): an agent adds a GitHub Pages workflow with a docs/** filter, and the owner switches the Pages source in the repository settings.

Saving: About 3 jobs per merge that changes no file under docs/ (estimated from one day of data).

Found by the CI and test audit of 2026-11-11. The account runs at most 20 hosted jobs at one time (measured), so each job that does no work makes the queue of each pull request longer.

Proposed Solution & Architectural Design

  • Add a Pages workflow (for example .github/workflows/pages.yml) that runs on a push to main with paths: ['docs/**', '<the workflow file>'], and on workflow_dispatch.
  • Build job: actions/configure-pages, actions/jekyll-build-pages (the same version as the Docs Site Build check) and actions/upload-pages-artifact. Deploy job: actions/deploy-pages with pages: write and id-token: write in the github-pages environment. Pin each action by commit SHA, as ci.yml does.
  • Use the concurrency group pages with cancel-in-progress: false, as the GitHub starter workflow does.
  • The PR posts one comment that gives the owner the settings step: Settings > Pages > Build and deployment > Source: GitHub Actions. Only the owner changes repository settings. Until the switch, the legacy build continues to publish the site.
  • perf(ci): move the four path checks into filtered workflows #4653 moves the Docs Site Build check into a filtered workflow of its own. If it merges first, put the PR build of the site in the same workflow file, so that one file defines the site build.

Risk: Low. The owner must change the Pages source. Until then, both the legacy build and the new workflow can run.

Target Subsystem

SDLC, Git & PR Governance (.github/workflows/).

Existing Tool Considered

The official GitHub Pages actions (actions/configure-pages, actions/jekyll-build-pages, actions/upload-pages-artifact, actions/deploy-pages) and the native paths filter. No new tool. Cost: about 20,000 tokens and 1 hour.

Acceptance Criteria

  • The PR has one comment that gives the owner the settings step.
  • After the owner switch, a push to main that changes no file under docs/ starts no Pages job.
  • After the owner switch, a push that changes docs/ builds and deploys the site, and the published site shows the change.

Dependencies

None. Related: #4653.

Activity

  1. added
    source/agent
    type/infra
    status/new
    value/medium
    effort/low
    on Nov 11, 2026
  2. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/infra. The ci prefix of the title gives the type.
    • Scope: none. The title has the scope pages, and .github/labels.yml declares no scope/pages label. Add the label to the file to give the scope to this item.
    • Priority: P2-Medium. Saves about 3 jobs per merge but does not block delivery or fix a defect.
    • Value: Medium. Reduces queue time for all PRs by removing no-op Pages jobs, but the site still publishes correctly without it.
    • Effort: Low. One workflow file plus one owner settings change; estimated at 1 hour.
    • Related: perf(ci): move the four path checks into filtered workflows #4653, which asks for a different change. Both reduce CI job starts by filtering on docs paths; #4653 moves the PR-time Docs Site Build check into a filtered workflow, while the candidate adds a new Pages deployment workflow for push-to-main.
  3. added
    priority/p2-medium
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 11, 2026
  4. removed
    status/in-progress
    owner/agent
    on Nov 11, 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/lowpriority/p2-mediumsource/agenttype/infravalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions