ci: skip build-site on PRs without docs/source changes

Add a docs filter to detect-changes and gate build-site so it is
skipped when a PR only touches the workflow YAML file.  Push and
dispatch triggers are unaffected.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
Ramon Roche
2026-02-11 13:24:15 -08:00
parent d886db8aab
commit 907823f9c5
2 changed files with 11 additions and 6 deletions
+4 -3
View File
@@ -22,7 +22,7 @@ Jobs are organized in tiers, where each tier depends on the previous one complet
| T2 | PR Metadata | Yes (conditional) | — | Builds PX4 SITL and regenerates all auto-generated docs |
| T2 | Metadata Sync | — | Yes | Builds PX4 SITL, regenerates metadata, auto-commits |
| T2 | Link Check | Yes | — | Checks for broken links in changed files, posts PR comment |
| T3 | Build Site | Yes (gated on T2) | Yes (after T2) | Builds the VitePress documentation site |
| T3 | Build Site | Yes (if docs/source changed) | Yes (after T2) | Builds the VitePress documentation site |
| T4 | Deploy | — | Yes | Deploys to AWS S3 |
#### Pull Request Flow
@@ -53,7 +53,8 @@ PR Event
┌─────────────────────────────────────┐
│ T3: Build Site (~7-10 min) │
│ (only if link check passed)
│ (skipped if only workflow YAML
│ changed — no docs/source changes) │
│ • Builds VitePress site │
│ • Verifies no build errors │
└─────────────────┬───────────────────┘
@@ -67,7 +68,7 @@ PR Event
| **T1: Detect Changes** | ~10s | Determines if metadata regeneration is needed |
| **T2: PR Metadata** | ~10-15m | Rebuilds PX4 SITL and regenerates all metadata (only if source files changed) |
| **T2: Link Check** | ~30s | Checks for broken links in changed markdown files and posts a sticky comment to the PR (skipped on fork PRs) |
| **T3: Build Site** | ~7-10m | Builds the VitePress site to verify there are no build errors. Gated on link check passing. |
| **T3: Build Site** | ~7-10m | Builds the VitePress site to verify there are no build errors. Skipped when only the workflow YAML changed (no docs or source changes). |
#### Push / Dispatch Flow (main/release branches)