Skip to content

feat: add site-deploy reusable workflow (Astro → ECR → ECS) - #47

Merged
cpitzi merged 1 commit into
mainfrom
agent/site-deploy-reusable-workflow
Aug 17, 2026
Merged

feat: add site-deploy reusable workflow (Astro → ECR → ECS)#47
cpitzi merged 1 commit into
mainfrom
agent/site-deploy-reusable-workflow

Conversation

@lentago-claude-runner

Copy link
Copy Markdown
Contributor

References #38.

Extracts the near-identical deploy.yml from site-lentago-dev, site-icecreamtofightwith-com, and site-pondviewlane-com into a single site-deploy.yml workflow_call definition in this repo. Callers migrate one repo at a time; no caller repos are modified here.

What changed

New file: .github/workflows/site-deploy.yml

Parameterises exactly what differs across the three current callers:

Input Purpose
ecr_repo, ecs_cluster, ecs_service, role_arn Per-site AWS coordinates
aws_region Default us-east-1
node_version Default 20; pondview uses 24
fetch_depth Default 1; pondview needs 0 for Starlight lastUpdated
pre_build_command icecream's python3 sync_recipes.py before npm run build
build_env_vars Newline-separated KEY=VALUE pairs for build-time env; pondview uses PUBLIC_ASK_ENDPOINT
attest Boolean, default true

Deploy behaviour is unchanged from the three originals: same :latest + :<sha> ECR tags, same --force-new-deployment, same aws ecs wait services-stable.

Two new capabilities added where centralising makes them essentially free:

  • Trivy image scan — informational (exit-code: 0), CRITICAL/HIGH unfixed findings only. Reports in the job log without blocking the deploy, giving visibility without introducing a new breakage vector on live sites.
  • actions/attest-build-provenance — building inside a reusable workflow (hosted in a repo callers cannot modify) satisfies SLSA Build L3 vs L2 for caller-hosted workflows. Attestation stored in GitHub's Sigstore-backed store; verify with gh attestation verify oci://<registry>/<ecr_repo>@<digest> --owner lentago. Controllable via attest input (default true).

All third-party action refs are SHA-pinned per repo convention.

Updated: README.md — full site-deploy.yml section with permissions table, minimum caller example (@v1.1.0), full input reference, and per-site examples for icecream and pondview.

Updated: CLAUDE.md — workflow table row added.

What's not in this PR

  • No changes to any caller repo — migration is per-site, one PR at a time.
  • Closes #38 is intentionally omitted — issue stays open until all three sites have migrated and their inline deploy.yml files are removed.

Caller migration checklist (for follow-up PRs)

Each site needs a PR that:

  1. Replaces .github/workflows/deploy.yml with a thin caller that uses: lentago/shared-workflows/.github/workflows/site-deploy.yml@v1.1.0
  2. Grants attestations: write and packages: read in the caller job permissions
  3. Passes the site-specific with: inputs (see README examples)

🤖 Generated with Claude Code

Extracts the near-identical deploy.yml from site-lentago-dev,
site-icecreamtofightwith-com, and site-pondviewlane-com into a single
reusable workflow_call definition.

Parameterises exactly what differs across the three callers: ECR repo,
ECS cluster/service, AWS region, OIDC role ARN, Node version, git fetch
depth, an optional pre_build_command (for icecream's Python content sync),
and optional build_env_vars (for pondview's PUBLIC_ASK_ENDPOINT). Preserves
the deploy-main concurrency group, :latest + :sha tags, force-new-deployment,
and the ecs wait services-stable call unchanged.

Adds two capabilities that are cheap to centralise here:
- Trivy image scan (informational, exit-code 0 — visibility without blocking)
- actions/attest-build-provenance for SLSA Build L3 attestation (building in
  a reusable workflow satisfies L3 vs L2 for caller-hosted workflows);
  attestation is controllable via the `attest` boolean input (default true)

All third-party action refs are SHA-pinned per repo convention.

Callers migrate one repo at a time; no caller repos are modified in this PR.

Closes #38 is intentionally omitted — the issue stays open until all three
site repos have migrated.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cpitzi
cpitzi merged commit b698113 into main Aug 17, 2026
1 check passed
@cpitzi
cpitzi deleted the agent/site-deploy-reusable-workflow branch August 17, 2026 02:07
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