- read

Deploy Your Static Site to S3 with GitHub Actions in Minutes

Ryan James 52

Deploy Your Static Site to S3 with GitHub Actions in Minutes

Set up a simple CI/CD pipeline with GitHub Actions

Ryan James
Level Up Coding
Published in
6 min read16 hours ago

--

Photo by Roman Synkevych on Unsplash

Do you spend too much time manually deploying your static site to S3?

With GitHub Actions, you can automate the entire process with just a few clicks. In this post, I’ll show you how to set up a CI/CD pipeline in minutes so you can see your changes live on the World Wide Web with a single git push.

Lucky for us, the setup is incredibly simple and 100% free. I’ll walk you through the following steps to get your CI/CD pipeline up and running in just a few minutes.

Table of Contents

  • Create a Simple Static Site
  • Push To Git Repo
  • Configure AWS Bucket
  • Setup GitHub Action
  • Test Your Pipeline

Create a Simple Static Site

First, we will create a simple website. If you already have your application, the Git repository setup, and the S3 bucket configured, please skip to step 4.

I’m going to use Astro to do this. If you’re curious about why I chose this technology, I wrote about it last week:

I have also created an article on how to deploy an Astro site to an S3 bucket. So, if you have not yet set all of this up, I recommend reading this article:

Push To Git Repo

If you work on a team, you likely store your codebase in Git. This tutorial is only for GitHub using Actions, but GitLab and BitBucket offer similar tools to help automate your deployment pipeline.