Skip to content

Commit

Permalink
Enable CD to Amazon S3
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoretsu committed Jan 5, 2024
1 parent 6a886a9 commit 3217610
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 8 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: deploy static website to AWS-S3

on:
push:
branches:
- "main"
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: 🏗 Checkout repo
uses: actions/checkout@v3

- name: 🏗 Enable PNPM
uses: pnpm/action-setup@v2
with:
version: "latest"

- name: 🏗 Setup Node.js environment
uses: actions/setup-node@main
with:
node-version: "lts/*"
cache: "pnpm"

- name: 📦 Install dependencies
run: pnpm i

- name: 🚀 Build the app
run: pnpm build

- name: Set up AWS CLI
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Deploy to AWS S3
run: aws s3 sync ./out s3://maple-sim --delete
8 changes: 0 additions & 8 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ module.exports = async (phase, { defaultConfig }) => {
},
},
},
images: {
remotePatterns: [
{
hostname: "d1jarb7xa67pb9.cloudfront.net",
protocol: "https",
},
],
},
output: "export",
productionBrowserSourceMaps: true,
reactStrictMode: true,
Expand Down

0 comments on commit 3217610

Please sign in to comment.