Skip to content

ci: skip Go jobs and add docs-site build for docs-only PRs#21045

Merged
AskAlexSharov merged 4 commits into
release/3.4from
ci/docs-path-filter-release-3.4
May 9, 2026
Merged

ci: skip Go jobs and add docs-site build for docs-only PRs#21045
AskAlexSharov merged 4 commits into
release/3.4from
ci/docs-path-filter-release-3.4

Conversation

@bloxster

@bloxster bloxster commented May 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Sibling of #21028 (which lands the same path-filter on main's ci-gate.yml). When a PR only touches docs/, root llms*.txt, or root *.md, skip the linux and win Go test runs (~20-30 min saved per PR) and instead run a docs-site typecheck/build with the llms.txt drift + unittest guard.

How it works

A new fast changes job calls gh api .../pulls/{n}/files and emits two outputs:

  • codefalse if every changed file is under docs/, root llms*.txt, or root *.md; otherwise true. Defaults to true for push / workflow_dispatch so nothing is skipped on merge.
  • docs_sitetrue when any docs/site/** file is touched.

linux and win are gated on code != 'false'. A new docs-site job (calling the new reusable docs-site-build.yml) runs when docs_site == 'true'.

If the gh api call fails, the step exits with code 1 — the gate fails rather than silently defaulting to skipping jobs.

What runs when

PR scope linux/win docs-site
Pure code (*.go, etc.) ✅ runs ⏭️ skipped
Mixed code + docs ✅ runs ✅ runs
Pure docs (docs/site/**) ⏭️ skipped ✅ runs
Pure root-level docs (llms.txt, README.md) ⏭️ skipped ⏭️ skipped
push to main / release/** ✅ runs ✅ runs

File-pattern logic

A PR is docs-only (skips Go CI) when every changed file matches:

^(docs/|llms[^/]*\.txt$|[^/]*\.md$)

i.e. files under docs/, root-level llms*.txt, or root-level *.md. Nested .md files (e.g. execution/README.md) still count as code changes.

docs-site-build.yml

Reusable workflow_call leaf that:

  1. Sets up Python 3.11 + runs python3 docs/site/scripts/generate-llms.py --check and python3 -m unittest discover docs/site/scripts -v (the llms drift guard from [r3.4] docs: add llms.txt generator script and update root llms.txt #21000)
  2. Sets up Node 20 + runs npm ci, npm run typecheck, npm run build against docs/site/

Has a defensive guard that skips silently if docs/site/package.json or docs/site/scripts/generate-llms.py is absent — covering both fully absent docs/site/ and partial migration states.

Files

File Change
.github/workflows/ci.yml Add permissions: pull-requests: read, changes job, gate linux/win with code != 'false', add docs-site job
.github/workflows/docs-site-build.yml New reusable workflow (Python llms guard + Node typecheck/build)

Test plan

  • Open a docs-only PR (touch docs/site/docs/...) — confirm linux/win are skipped and docs-site runs
  • Open a mixed PR (one .go file + one .md file) — confirm both linux/win and docs-site run
  • Open a pure code PR — confirm docs-site is skipped, linux/win run
  • Push to release/3.4 — confirm everything runs (no skipping)

🤖 Generated with Claude Code

Mirrors the path-filter pattern from #21028 (which lands the same
mechanism on main's ci-gate.yml). When a PR only touches docs/, root
llms*.txt, or root *.md, skip linux/win Go test runs (~20-30 min saved
per PR) and instead run a docs-site typecheck/build with the llms.txt
drift + unittest guard.

Detection happens via `gh api .../pulls/{n}/files` in a fast `changes`
job; other jobs gate on its outputs. For push and workflow_dispatch
events the changes job defaults code=true/docs_site=true so nothing is
skipped on merge.

Adds .github/workflows/docs-site-build.yml as a workflow_call leaf with
a defensive guard for branches that predate docs/site/.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the main CI workflow to detect docs-only pull requests and skip the longer Go test jobs, while adding a dedicated docs-site typecheck/build job for changes under docs/site/**. It aims to reduce CI time for docs-only PRs and still validate the Docusaurus site when relevant.

Changes:

  • Add a changes job in .github/workflows/ci.yml that classifies PRs as “code” vs “docs-only” and detects whether docs/site/** changed.
  • Gate linux/win jobs on needs.changes.outputs.code != 'false' to skip Go CI for docs-only PRs.
  • Add a new reusable workflow .github/workflows/docs-site-build.yml and a docs-site job in ci.yml to run npm ci/typecheck/build when docs/site/** is touched.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/ci.yml Adds PR-file change detection and uses it to skip Go jobs for docs-only PRs; adds a docs-site job calling a reusable workflow.
.github/workflows/docs-site-build.yml Introduces a reusable docs-site build workflow (Python guard + Node typecheck/build).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/docs-site-build.yml
Comment thread .github/workflows/docs-site-build.yml Outdated
Gianni and others added 2 commits May 9, 2026 07:08
The guard only checked for docs/site/package.json, but subsequent steps
also require docs/site/scripts/generate-llms.py. On branches in a partial
migration state the job would fail mid-run instead of skipping silently.

Addresses Copilot review comments.
@AskAlexSharov AskAlexSharov enabled auto-merge (squash) May 9, 2026 09:13
@AskAlexSharov AskAlexSharov merged commit 2296e0b into release/3.4 May 9, 2026
23 checks passed
@AskAlexSharov AskAlexSharov deleted the ci/docs-path-filter-release-3.4 branch May 9, 2026 09:24
pull Bot pushed a commit to Dustin4444/erigon that referenced this pull request May 13, 2026
## Summary

Brings the full `docs/site/` Docusaurus tree into `main`, incorporating
all documentation improvements developed against `release/3.4`.

**Scope:** `docs/site/**` + root `llms.txt` / `llms-full.txt` + removal
of superseded `docs/gitbook/` and `docs/gitbook-help/`. No changes to
Go, proto, or any non-docs source files.

### Included — merged to release/3.4

| PR | What |
|----|------|
| [erigontech#20883](erigontech#20883) | Docusaurus
v3 migration — full `docs/site/` tree, Docusaurus config, versioned v3.3
snapshot |
| [erigontech#20263](erigontech#20263) /
[erigontech#20264](erigontech#20264) | All v3.3
docs ported; branch/versioning convention established |
| [erigontech#20978](erigontech#20978) | Mobile
footer fix, SEO meta tags, OG image |
| [erigontech#20991](erigontech#20991) | Self-host
brand fonts (remove Google Fonts / CDN) |
| [erigontech#21000](erigontech#21000) | `llms.txt`
/ `llms-full.txt` generator script + root artifacts |
| [erigontech#21018](erigontech#21018) | May 2026
w19 maintenance — stale flags, broken links, accuracy fixes |
| [erigontech#21045](erigontech#21045) | CI:
docs-only path filter (skip Go jobs, run docs-site build) |
| [erigontech#21063](erigontech#21063) | `trace`
response fields reference + sync-monitoring guidance |
| [erigontech#21074](erigontech#21074) | Regenerate
`llms.txt` after sync-modes update |
| [erigontech#20997](erigontech#20997) | Brand font
consistency fix, installation page UX |

### Included — pending review on release/3.4

| PR | What |
|----|------|
| [erigontech#21030](erigontech#21030) | Automated
disk size pipeline: `update-disk-sizes.py`, `disk-sizes.json`,
`hardware-requirements.mdx` JSX fix, `generate-llms.py` `—` fallback,
unit tests |
| [erigontech#21129](erigontech#21129) | May 2026
w20 maintenance — `--caplin.nat`, `--caplin.columns-keep-slots`, RPC
subscription defaults, `nat.md` Caplin section, log.dir.verbosity
default |

### What changes on `main`

- `docs/site/` added (full Docusaurus tree, current v3.4 + frozen v3.3
snapshot)
- `docs/gitbook/` and `docs/gitbook-help/` removed (superseded by
Docusaurus)
- Root `llms.txt` and `llms-full.txt` updated to Docusaurus-generated
versions

> ⚠️ This PR does **not** remove `docs/gitbook/` yet — that cleanup will
be a separate commit once this PR is reviewed and approved.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Bloxster <bloxster@proton.me>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: lupin012 <58134934+lupin012@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants