githubEdit

Update CloudFront

Use DuploCloud to update your CloudFront from Github Actions

Introduction

The goal of this section is to show how you can upload to an S3 bucket and update a CloudFront distribution from Github Actions.

This process is done in four basic steps:

  • Logs in to AWS ECR using Just-In-Time (JIT) AWS credentials from DuploCloud

  • Build your website content

  • Upload your website content to S3

  • Inform AWS CloudFront that the website content has changed

circle-info

NOTE: The example workflow assumes that all the website content is uploaded from a single subfolder named build. It also makes extremely conservative assumptions about cache lifetimes. Your actual website content may allow a more optimal cache lifetime.

circle-exclamation
Upload to S3 bucketchevron-right

Example workflow

To use it you will need to change the following:

  • The steps used to build your website content

  • duplo_host env var

  • CLOUDFRONT_ID env var

  • TENANT_NAME env var

  • BUCKET_NAME env var

You also likely will need to change the paths and AWS CLI arguments used to upload your website content.

Last updated

Was this helpful?