From 168e569b1150aaa5a3f2e2a30f5ecce57912e2e9 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Sun, 18 Oct 2026 04:16:14 +0200 Subject: [PATCH] chore: trigger the site only on its own inputs The site deploy still triggered on seven scripts it stopped importing when the pack and site modules were split, and on the test suite it never runs, so a builder-only push rebuilt the site for nothing. The triggers now match the build's import closure in both directions. --- .github/workflows/deploy-site.yml | 11 ++--------- tests/test_workflow_paths.py | 6 ++++++ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy-site.yml b/.github/workflows/deploy-site.yml index a3c6adb4..3f9e40e9 100644 --- a/.github/workflows/deploy-site.yml +++ b/.github/workflows/deploy-site.yml @@ -8,28 +8,23 @@ on: - "emulators/**" - "provenance/**" - "wiki/**" - # Every script the build runs or imports (tests/test_workflow_paths.py). + # Every script the build runs or imports, and no other + # (tests/test_workflow_paths.py). - "scripts/artifacts.py" - - "scripts/auto_fetch.py" - "scripts/common.py" - "scripts/cross_reference.py" - "scripts/crypto_verify.py" - "scripts/derivations.py" - - "scripts/deterministic_zip.py" - "scripts/dumpcatalog.py" - - "scripts/generate_pack.py" - "scripts/generate_readme.py" - "scripts/generate_site.py" - "scripts/hashing.py" - "scripts/largefiles.py" - - "scripts/list_platforms.py" - - "scripts/manifestselect.py" - "scripts/nativemode.py" - "scripts/packextras.py" - "scripts/packpaths.py" - "scripts/packreadme.py" - "scripts/packresolve.py" - - "scripts/packverify.py" - "scripts/profile_sync.py" - "scripts/provenance_report.py" - "scripts/refresh_data_dirs.py" @@ -41,7 +36,6 @@ on: - "scripts/siterender.py" - "scripts/sitesources.py" - "scripts/sitewrite.py" - - "scripts/slot.py" - "scripts/slots.py" - "scripts/split_pack.py" - "scripts/truth.py" @@ -52,7 +46,6 @@ on: - "scripts/verify.py" - "scripts/ziptools.py" - "schemas/**" - - "tests/**" - "docs_assets/**" - "install/**" - "install.py" diff --git a/tests/test_workflow_paths.py b/tests/test_workflow_paths.py index 9cf03836..64e4de62 100644 --- a/tests/test_workflow_paths.py +++ b/tests/test_workflow_paths.py @@ -84,6 +84,12 @@ class DeploySiteTriggers(unittest.TestCase): if not any(fnmatch.fnmatch(path, p.replace("**", "*")) for p in patterns) ) self.assertEqual(uncovered, []) + # And no script the build no longer reaches: generate_pack.py and six + # others stayed listed after the site stopped importing the builder, + # and a push touching only them rebuilt the site for nothing. + listed = {p for p in patterns if p.startswith("scripts/") and p.endswith(".py")} + self.assertEqual(sorted(listed - closure(entry_points)), []) + self.assertNotIn("tests/**", patterns) class DocumentedSteps(unittest.TestCase):