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. When auto-deploy matches a push, Springwinter runs your build command, uploads the output to S3, and requests CloudFront invalidation. Deployment, edge propagation, browser caching, and service workers can affect when a visitor sees the update.

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. Wait for the deployment workflow and distribution to be ready, then verify the assigned CloudFront URL. An invalidation alone does not prove the deployed application works.

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 requests a CloudFront invalidation. This affects CloudFront caches, not caches in browsers or service workers.
  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

Saving settings does not rebuild or publish the website. Select Redeploy after saving to apply the new build command, output directory or build variables.

Redeploy

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

Branch Previews

Previews can inherit production environment values. This example uses variables: [] to avoid copying them. Supply the full preview-specific set when the application requires variables. Review databases, queues and external services before creation. See preview boundaries. 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.

Build variables

Expand Build variables in the creation form to configure the first build. After creation, edit values under Environment and select Save build variables. Select Redeploy, or rebuild the selected preview, to apply them. Saving does not start a build. Your build command receives these values from the AWS CodeBuild project. Static websites have build variables only, with no runtime injection into served files. Values can become public in generated JavaScript; use them for configuration, not secrets.
PUT replaces the complete editable build set. Include every value to retain. See Environment variables.

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.