Skip to main content
A static website in Springwinter is built from your GitHub repository and published to an S3 bucket sitting behind a CloudFront distribution, both provisioned inside your own AWS account. Springwinter runs your build command on every push, uploads the output to S3, and invalidates the CloudFront cache so your visitors always see the latest version.

Use Cases

Static websites work well for any project that produces a folder of HTML, CSS, and JavaScript files at build time:

Marketing Sites

Fast, globally distributed pages for your product or company homepage.

Single-Page Applications

React, Vue, Svelte, or any other SPA framework that outputs a dist or build directory.

Documentation Sites

Statically generated docs built with tools like Docusaurus, VitePress, or Hugo.

Landing Pages

Campaign pages, event registrations, and product launches that need zero cold-start time.

Requirements

Before you deploy a static website, make sure you have:
  • A GitHub repository with a build command that outputs static files to a known directory.
  • An AWS account connected to Springwinter. See Connect Your AWS Account.
  • A GitHub account connected via the Springwinter GitHub App. See Connect GitHub.

Deploy a Static Website

1

Add the resource

Open your project in the Springwinter dashboard, click Add resource, and select Static website.
2

Select a repository and branch

Choose the GitHub repository to deploy from and the branch to track. Springwinter will build and publish on every push to that branch when auto-deploy is enabled.
3

Set the build command

Enter the command that compiles your site — for example, npm run build, yarn build, or hugo. Springwinter runs this command inside a clean environment with your repository checked out.
4

Set the publish directory

Enter the directory that contains the built output — for example, dist, build, out, or public. Springwinter uploads the contents of this directory to your S3 bucket.
5

Deploy

Click Deploy. Springwinter runs your build command, syncs the output to S3, and invalidates the CloudFront cache. Your site is live at the assigned CloudFront URL as soon as the invalidation completes.

How Builds Work

Every deployment follows the same sequence:
  1. Springwinter checks out the latest commit on the tracked branch.
  2. Your build command runs in an isolated environment.
  3. The contents of your publish directory are uploaded to your S3 bucket.
  4. Springwinter creates a CloudFront cache invalidation so all cached files are purged.
  5. CloudFront begins serving the new files from the nearest edge location.
The S3 bucket is not publicly accessible on its own. CloudFront is the only entry point, and Springwinter configures an Origin Access Control (OAC) policy to enforce this.

Configuration Options

The shell command Springwinter runs to produce your static output — for example, npm run build or yarn export. The command runs from the repository root.
The path, relative to the repository root, where your build command writes its output files. Common values are dist, build, out, and public.
When enabled, every push to the tracked branch triggers a new build and deploy automatically. Disable auto-deploy if you need manual control over when updates go live.
Injected into the build environment at build time. Use them to pass API endpoints, feature flags, or other values your build tool needs. See Environment Variables.

API Reference

Create a Static Website

Get a Static Website

Update a Static Website

Redeploy

To trigger a manual rebuild and republish without pushing a commit:

Branch Previews

Each branch in your repository can have its own preview deployment with its own CloudFront URL, letting you verify changes before merging. Create a preview via the API:
Share the preview URL with your team or stakeholders to get sign-off before merging to your production branch.

Environment Variables

Retrieve the current build-time environment variables for a static website:
Replace all environment variables at once:
For static websites, environment variables are injected at build time, not at runtime. Update your environment variables and trigger a redeploy to pick up changes.

Logs and Metrics

Build logs are available from the Logs tab in the dashboard or via:
CloudFront request and error metrics are available from the Metrics tab or via:

Cost Estimate

Retrieve the current S3 and CloudFront cost estimate for a static website:

Teardown

To delete a static website and remove the S3 bucket and CloudFront distribution from your AWS account:
Deleting a static website removes the S3 bucket and all its contents, along with the CloudFront distribution. This action cannot be undone. Download any assets you need to preserve before deleting.