feat(site-publish): scope publication with an artifacts selection
Test / contract (pull_request) Successful in 7s
Test / contract (pull_request) Successful in 7s
A repository whose artifacts ship on different cadences has no way to publish one of them. Baseline needs it: every merge to main must put the catalogue live in under five minutes, while `dist/` is content-addressed and may only be written by a tag release. Today the action iterates cfg["artifacts"] unconditionally, so the only lever is deleting the distributions artifact from site.yaml — which changes the stored publication contract and drives the route-retirement path. The new `artifacts:` input names the subset this run builds and publishes. Selection scopes the build, the immutable preflight, the CORS reconcile, the S3 sync, and credential resolution. It deliberately does not scope manifest rendering or the immutable-path history: those stay whole, so a scoped run can never retire another artifact's route or delete its bucket contents. An undeclared name fails before the first bucket is touched; `enabled: false` refuses a selection because decommissioning is whole-site. Default is unchanged: no input publishes every declared artifact. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UjQqc4qFmdpAWaYfy2Aypb
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
9287e4861a
commit
3dfee64335
+9
-2
@@ -5,7 +5,14 @@ import subprocess
|
||||
import tempfile
|
||||
from pathlib import Path
|
||||
|
||||
from utils import EXCLUDE_FILES, env, parse_site_yaml, run, validate_artifact_inputs
|
||||
from utils import (
|
||||
EXCLUDE_FILES,
|
||||
env,
|
||||
parse_site_yaml,
|
||||
run,
|
||||
selected_artifacts,
|
||||
validate_artifact_inputs,
|
||||
)
|
||||
|
||||
|
||||
def build_artifact(site_dir, artifact):
|
||||
@@ -66,5 +73,5 @@ def cmd_build():
|
||||
|
||||
validate_artifact_inputs(site_dir, cfg)
|
||||
|
||||
for artifact in cfg["artifacts"]:
|
||||
for artifact in selected_artifacts(cfg):
|
||||
build_artifact(site_dir, artifact)
|
||||
|
||||
Reference in New Issue
Block a user