Skip to content

refactor: run the build from a table of steps - #485

Merged
has2k1 merged 4 commits into
mainfrom
refactor/step-table
Oct 30, 2026
Merged

has2k1 merged 4 commits into
mainfrom
refactor/step-table

Conversation

@has2k1

@has2k1 has2k1 commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

The build now runs from one ordered table of steps instead of a long method that numbered each step by hand. Step numbers and the total came from a hard-coded count of twenty, and each step repeated its own logging, output capture, working-directory change and error handling. A row now declares these, so adding, removing or reordering a step no longer means renumbering the rest. The step log is unchanged.

Two things change for site authors whose build fails. A failed render now ends the log at the failure, without the "Generate SEO files, Skipped" line that followed it. Failures in the changelog, user guide, custom sections, custom pages, tags, status badges and assets steps now stop the build instead of being shown as warnings over an incomplete site. When the failure is a problem in the project, such as a path that leaves the build directory or a missing header include, the log names the failing step and gives the reason. Steps that import or run the project's code still warn when that code fails.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

📚 Preview this PR's docs locally

Fetch the just-built site and open it in your browser:

# this exact build
great-docs preview --run 41082660858

# or always the latest build for this PR
great-docs preview --pr 485
Auth & tips
  • Requires great-docs: pip install great-docs (or run via pipx/uvx).
  • Auth: run gh auth login then add --use-gh, or set GITHUB_TOKEN (needs Actions: read).
  • Jump to a page: add --path reference/index.html.
  • Latest vs exact: --pr <n> grabs the newest build; --run <id> pins this one.
  • Re-download: --refresh ignores the local cache.

Represent build steps as rows with an action and logging policy. Add a
runner that numbers listed rows, reports results and skip reasons, sends
`print()` output to build log detail lines, and runs project code from the
build directory.

Report recoverable step failures as warnings. Report fatal step failures
and print the footer before raising `BuildError`. The build does not use
the runner yet.
End the log after the failure line, details and footer when Quarto fails
to render the site or every version of a versioned site fails. Omit the
subsequent "Generate SEO files" skip entry so render failures end the log
in the same way as other fatal failures.
Describe the build as rows with an action, logging policy and working
directory. Derive step numbers and the total from the listed rows instead
of a fixed count. Each action returns a result line or skip reason.

Preserve the twenty numbered steps, result lines, warnings and footer.
Continue to run steps that import or execute project code from the build
directory and send `print()` output to build log detail lines.

Use the shared Quarto configuration editor when retrying API reference
generation with static analysis.
Limit the exceptions that build steps convert to warnings. The CLI and
MCP server references and the API snapshot still warn and continue on
`ImportError`, `SyntaxError`, `AttributeError`, `RuntimeError`, `OSError`
and griffe errors from importing or running project code. The Go and Rust
CLI references catch `OSError`. The API reference also catches configured
names it cannot find. SEO file generation still warns on `OSError`.

Stop the build on failures when generating the changelog, processing the
user guide, custom sections, custom pages, page tags or status badges, or
copying assets.

Report the step as failed and raise `BuildError` when a user guide, custom
section or custom page path escapes the build directory, or the assets
step finds no header include file. Propagate all other exceptions from
these steps unchanged. Also propagate errors in great-docs itself outside
steps that handle project code failures, such as `AttributeError`.
@has2k1
has2k1 force-pushed the refactor/step-table branch from a6b2438 to 9f9143b Compare October 30, 2026 15:38
@has2k1
has2k1 merged commit 4232670 into main Oct 30, 2026
9 checks passed
@has2k1
has2k1 deleted the refactor/step-table branch October 30, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant