Skip to content

static-site-s3: reusable deploy of a static site to S3 and CloudFront #174

Open

Description

@swibrow

What

A reusable workflow that deploys a built static site to S3 behind CloudFront.

Why it matters

DND-IT/tamedia-ai-platform deploys its Astro site (docs.yaml) with custom steps: read the bucket and distribution from Terraform outputs, aws s3 sync --delete with a short cache, a second copy of the hashed _astro/ assets with immutable caching, and a CloudFront invalidation. Any team with a static site writes the same steps.

Suggested fix

static-site-s3.yaml with inputs: artifact_name (the built site), aws_oidc_role_arn, aws_region, bucket, prefix, distribution_id, cache_control (default), immutable_paths (globs that get max-age=31536000, immutable), and optional tf_dir plus tf_backend_config_files to read bucket and distribution_id from named Terraform outputs instead.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions