From b4bb41fcedf06c37e106473540c65a33746bfeb8 Mon Sep 17 00:00:00 2001 From: giho Date: Sat, 13 Jul 2024 17:46:03 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=ED=94=84=EB=A1=A0=ED=8A=B8=EC=97=94?= =?UTF-8?q?=EB=93=9C=20aws=20s3=20=EB=B0=B0=ED=8F=AC=ED=99=95=EC=9D=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 30 +++++++++++++++++++ .../Molcules/SideBar/CreateChannelButton.tsx | 6 +++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..4a388ac --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,30 @@ +name: Deploy to S3 + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install dependencies + run: npm install + + - name: Build project + run: npm run build + + - name: Deploy to S3 + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.AWS_REGION }} + S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }} + run: | + npm install -g aws-cli + aws s3 sync build/ s3://$S3_BUCKET_NAME --delete diff --git a/src/components/Molcules/SideBar/CreateChannelButton.tsx b/src/components/Molcules/SideBar/CreateChannelButton.tsx index a6a9631..d30c401 100644 --- a/src/components/Molcules/SideBar/CreateChannelButton.tsx +++ b/src/components/Molcules/SideBar/CreateChannelButton.tsx @@ -1,7 +1,11 @@ import styled from 'styled-components'; -import { CreateChannelButtonProps } from '../../types/interface'; import addChannelSvg from '../../../images/svg/add-square.svg'; +interface CreateChannelButtonProps { + isOpen: boolean; + onClick: () => void; +} + export default function CreateChannelButton({ isOpen, onClick }: CreateChannelButtonProps) { return (