<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Leehi</title>
    <description>The latest articles on DEV Community by Leehi (@lehibonafe).</description>
    <link>https://dev.to/lehibonafe</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3827873%2F0d04e48b-2a35-4bcd-ae84-21c8a15c2b24.png</url>
      <title>DEV Community: Leehi</title>
      <link>https://dev.to/lehibonafe</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lehibonafe"/>
    <language>en</language>
    <item>
      <title>Host a Static Website on AWS S3 with CloudFront, ACM, namecheap, and GitHub CI/CD</title>
      <dc:creator>Leehi</dc:creator>
      <pubDate>Thu, 19 Mar 2026 20:20:19 +0000</pubDate>
      <link>https://dev.to/lehibonafe/deploying-a-static-website-on-aws-s3-with-cloudfront-route53-and-github-actions-4463</link>
      <guid>https://dev.to/lehibonafe/deploying-a-static-website-on-aws-s3-with-cloudfront-route53-and-github-actions-4463</guid>
      <description>&lt;p&gt;Deploying a static website can be simple and efficient. By leveraging AWS S3, CloudFront, ACM, and GitHub Actions, you can host a &lt;strong&gt;fast&lt;/strong&gt;, &lt;strong&gt;secure&lt;/strong&gt;, and &lt;strong&gt;globally accessible&lt;/strong&gt; site, with fully &lt;strong&gt;automated deployments&lt;/strong&gt; whenever updates are made. This guide will walk you through the process step by step.&lt;/p&gt;

&lt;h3&gt;
  
  
  Architecture:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs7s6bacfbe0wojfbi2e2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs7s6bacfbe0wojfbi2e2.png" alt=" " width="800" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Host Your Static Website on S3
&lt;/h3&gt;

&lt;p&gt;This setup allows you to host a static website (HTML, CSS, JS) directly on Amazon S3 without needing a traditional web server. Amazon S3 provides a reliable, highly available, and scalable storage service&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Create an S3 Bucket&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to the &lt;strong&gt;AWS S3 console&lt;/strong&gt; and click &lt;strong&gt;Create bucket&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Name it after your domain (e.g., &lt;em&gt;mywebsitedomain.com&lt;/em&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Keep everything private:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Do not enable public access.&lt;/li&gt;
&lt;li&gt;Do not enable static website hosting - CloudFront will serve them&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Upload your website files:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add your &lt;strong&gt;.html&lt;/strong&gt;, &lt;strong&gt;.css&lt;/strong&gt;, &lt;strong&gt;.js&lt;/strong&gt;, and other static assets.
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvlnk2n8opv4uxyvdfhdd.png" alt=" " width="800" height="204"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Configure S3 Bucket Policy:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This policy will allow your Cloudfront distribution to access your S3 Bucket files.&lt;/li&gt;
&lt;li&gt;You can go back here later to change the &lt;em&gt;BUCKET_NAME&lt;/em&gt;, &lt;em&gt;ACCOUNT_ID&lt;/em&gt; &amp;amp; &lt;em&gt;DISTRIBUTION_ID&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"Version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2008-10-17"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"Id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"PolicyForCloudFrontPrivateContent"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"Statement"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"Sid"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"AllowCloudFrontServicePrincipal"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"Effect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Allow"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"Principal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"Service"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"cloudfront.amazonaws.com"&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"Action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"s3:GetObject"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"Resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"arn:aws:s3:::&amp;lt;BUCKET_NAME&amp;gt;/*"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"Condition"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"StringEquals"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
                    &lt;/span&gt;&lt;span class="nl"&gt;"AWS:SourceArn"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"arn:aws:cloudfront::&amp;lt;ACCOUNT_ID&amp;gt;:distribution/&amp;lt;DISTRIBUTION_ID&amp;gt;"&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Setup a CloudFront Distributions
&lt;/h3&gt;

&lt;p&gt;To securely deliver your website with low latency worldwide, we’ll use CloudFront with &lt;strong&gt;Origin Access Control (OAC)&lt;/strong&gt;. This ensures your S3 bucket remains private while CloudFront handles all public access.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Create a Cloudfront Distribution&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to &lt;strong&gt;Cloudfront&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Click Create distribution&lt;/li&gt;
&lt;li&gt;Choose a plan: Select the &lt;strong&gt;$0 Free tier plan&lt;/strong&gt; for testing or personal projects.&lt;/li&gt;
&lt;li&gt;Give a Distribution Name&lt;/li&gt;
&lt;li&gt;We will setup the domain later on these steps.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Configure Origin Settings&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Origin type&lt;/strong&gt;: S3 bucket&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;S3 Origin&lt;/strong&gt;: Select your S3 bucket (e.g., &lt;em&gt;mywebsitedomain.com&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;Just &lt;strong&gt;enable&lt;/strong&gt; "Allow private S3 access through CloudFront"&lt;/li&gt;
&lt;li&gt;Review and Create
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fstpa93spksfs0q0viphx.png" alt=" " width="800" height="424"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Create Origin Access Control&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to Cloudfront &amp;gt; Security&lt;/li&gt;
&lt;li&gt;Click Create control setting:
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuy8voqwjxx0s2nd034um.png" alt=" " width="477" height="440"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Add the OAC to your Cloudfront Distribution&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to Cloudfront &amp;gt; Distributions&lt;/li&gt;
&lt;li&gt;Select your Distribution&lt;/li&gt;
&lt;li&gt;In Origins tab, edit your existing origin&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Origin domain&lt;/strong&gt;: Select your S3 Bucket&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Origin Access&lt;/strong&gt;: Select "Origin access control settings"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Origin Access Control&lt;/strong&gt;: Add your OAC that you've created earlier
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2i75wnw0bh33j8u0ot51.png" alt=" " width="800" height="539"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 3: Buy a Domain from a Third-Party Registrar
&lt;/h3&gt;

&lt;p&gt;Before you can host your website, you’ll need a domain name. Using a third-party registrar like &lt;strong&gt;Namecheap&lt;/strong&gt;, &lt;strong&gt;GoDaddy&lt;/strong&gt;, or &lt;strong&gt;Google Domains&lt;/strong&gt; is simple and cost-effective. In this guide, we’ll use namecheap to purchase the domain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Choose a Domain Name&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pick a domain that represents your brand, project, or personal site.&lt;/li&gt;
&lt;li&gt;Check availability using the registrar’s search tool.&lt;/li&gt;
&lt;li&gt;Follow the registrar’s checkout process.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Manage DNS Settings&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After purchasing, you’ll have access to the domain’s DNS settings.&lt;/li&gt;
&lt;li&gt;In namecheap, &lt;strong&gt;Go to Domain List &amp;gt; Verify Contact &amp;gt; Manage &amp;gt; Advanced DNS&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;You’ll need to add CNAME or A records later to point to CloudFront and ACM.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 4: Request a Public Certificate
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Request a certificate via ACM&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Switch your AWS Region to &lt;strong&gt;us-east-1&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Go to &lt;strong&gt;AWS Certificate Manager&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Request a &lt;strong&gt;Public Certificate&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Validation method: &lt;strong&gt;DNS Validation&lt;/strong&gt;
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiws6fmcciflypfimlljc.png" alt=" " width="800" height="548"&gt;
&lt;/li&gt;
&lt;li&gt;ACM will generate a &lt;strong&gt;CNAME records&lt;/strong&gt; like:

&lt;ul&gt;
&lt;li&gt;Name: _&lt;em&gt;abc123.mywebsitedomain.com&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Value: _&lt;em&gt;xyz456.acm-validations.aws&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 5: Add CNAME Record to Domain Registar
&lt;/h3&gt;

&lt;p&gt;To validate your SSL/TLS certificate with AWS ACM, you need to add a CNAME record at your domain registrar.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Add CNAME record and ALIAS to your Domain Registar&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to &lt;strong&gt;Namecheap&lt;/strong&gt; &amp;gt; &lt;strong&gt;Advanced DNS&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Add new Record&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Type&lt;/strong&gt;: CNAME Record&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Host&lt;/strong&gt;: e.g., _&lt;em&gt;abc123&lt;/em&gt; (not the full domain, namecheap automatically appends your domain.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Value&lt;/strong&gt;: e.g., _&lt;em&gt;xyz456.acm-validations.aws&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TTL&lt;/strong&gt;: Automatic
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu73fcljxyxlg4zqy2irq.png" alt=" " width="800" height="82"&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;For &lt;strong&gt;Cloudfront&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Type&lt;/strong&gt;: ALIAS Record&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Host&lt;/strong&gt;: @&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Value&lt;/strong&gt;: e.g., &lt;em&gt;d19e7mdg4h8u43.cloudfront.net.&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TTL&lt;/strong&gt;: Automatic&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Save the record and wait for &lt;strong&gt;DNS propagation&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Go back to AWS ACM.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Once DNS has propagated, the certificate status will change to &lt;strong&gt;Issued&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;This usually takes a few minutes, but sometimes longer depending on your DNS provider.
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbt2mt15lika1noetolx2.png" alt=" " width="800" height="57"&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 6: Add Your Domain and SSL Certificate to CloudFront
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Go to the **CloudFront **console and select your distribution.&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;General&lt;/strong&gt; tab, click Edit&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alternate domain name&lt;/strong&gt;: Your Domain Name&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom SSL certificate&lt;/strong&gt;: Select your ACM&lt;/li&gt;
&lt;li&gt;Save changes and wait for CloudFront to deploy the updates.
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpe83gd5e80ps0m1dbrem.png" alt=" " width="800" height="585"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 7: Setup Your GitHub Repository
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Create a &lt;strong&gt;new repository&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Add your website files to the repository&lt;/li&gt;
&lt;li&gt;Go to Settings &amp;gt; Secrets and variables &amp;gt; Actions&lt;/li&gt;
&lt;li&gt;Add the following secrets:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;AWS_ACCESS_KEY_ID&lt;/code&gt; : Your IAM user's access key&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;AWS_SECRET_ACCESS_KEY&lt;/code&gt; : Your IAM user's secret key&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;AWS_REGION&lt;/code&gt; : Your AWS Region&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CLOUDFRONT_DISTRIBUTION_ID&lt;/code&gt; : Your Distribution ID &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 8: Creating GitHub Actions Workflow
&lt;/h3&gt;

&lt;p&gt;The heart of our CI/CD pipeline is the GitHub Actions workflow file. Create a new file at &lt;code&gt;.github/workflows/main.yml&lt;/code&gt; with the following content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Deploy to S3 + CloudFront&lt;/span&gt;

&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;push&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;main&lt;/span&gt;

&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;deploy&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Checkout code&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v3&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Configure AWS credentials&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;aws-actions/configure-aws-credentials@v2&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;aws-access-key-id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.AWS_ACCESS_KEY_ID }}&lt;/span&gt;
          &lt;span class="na"&gt;aws-secret-access-key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.AWS_SECRET_ACCESS_KEY }}&lt;/span&gt;
          &lt;span class="na"&gt;aws-region&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.AWS_REGION }}&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Sync to S3&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;aws s3 sync ./ ${{ secrets.S3_BUCKET }} --delete&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Invalidate CloudFront cache&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;aws cloudfront create-invalidation \&lt;/span&gt;
            &lt;span class="s"&gt;--distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} \&lt;/span&gt;
            &lt;span class="s"&gt;--paths "/*"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>aws</category>
      <category>cicd</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
