Skip to content

Commit

Permalink
feat:: Docker 버리고 S3 정적 배포
Browse files Browse the repository at this point in the history
  • Loading branch information
halionaz committed Sep 26, 2024
1 parent 420cc6c commit aa2fbc3
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 60 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Main(Prod) Docker Image CI

on:
push:
branches: ['main']

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Source Code
uses: actions/checkout@v4

- name: Install Dependencies
run: yarn

- name: Build
run: yarn build

- name: Configure AWS Credentials
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: ${{ secrets.AWS_REGION }}

- name: Deploy to S3
run: aws s3 sync ./dist s3://${{ secrets.DEV_AWS_S3_BUCKET }} --delete

- name: Invalidate CloudFront Cache
run: aws cloudfront create-invalidation \ --distribution-id ${{secrets.DEV_AWS_DISTRIBUTION_ID}} --paths "/*"
20 changes: 0 additions & 20 deletions .github/workflows/dev-deploy.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/main-deploy.yml

This file was deleted.

20 changes: 0 additions & 20 deletions Dockerfile

This file was deleted.

0 comments on commit aa2fbc3

Please sign in to comment.