From ab81911309425b7cdeea22212b6adc4f701e776b Mon Sep 17 00:00:00 2001 From: Wooyeol Lee <97590283+thisisWooyeol@users.noreply.github.com> Date: Wed, 6 Nov 2024 20:31:12 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20Initialize=20aws=20deploy=20acti?= =?UTF-8?q?on=20(#5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit deploy on dev server --- .github/workflows/deploy-dev.yml | 34 ++++++++++++++++++++++++++++++++ .gitignore | 3 +++ 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/deploy-dev.yml diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml new file mode 100644 index 0000000..137396a --- /dev/null +++ b/.github/workflows/deploy-dev.yml @@ -0,0 +1,34 @@ +name: deploy-dev + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + deploy: + name: Deploy + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '20.11.1' + + - name: Build & Export + run: | + yarn install + yarn build + + - name: Deploy to S3 and Invalidate Cloudfront + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ap-northeast-2 + run: | + aws s3 sync ./dist s3://2024-frontend-dev --delete + aws cloudfront create-invalidation --distribution-id E2H0ROC6UUSCKG --paths "/*" diff --git a/.gitignore b/.gitignore index 2ebbc5f..8b9a969 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,6 @@ dist-ssr !.yarn/releases !.yarn/sdks !.yarn/versions + +# TypeScript cache +*.tsbuildinfo \ No newline at end of file