Skip to content

Commit

Permalink
(chore: CI/CD 스크립트 수정)
Browse files Browse the repository at this point in the history
  • Loading branch information
dongkiid authored Nov 1, 2023
1 parent c533a5c commit feea2cc
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,32 @@
name: CD


on:
push:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

steps:

- name: Checkout source code
uses: actions/checkout@v3 # workflow에서 액세스할 수 있도록 저장소를 체크아웃

- name: Create .env file
run: |
jq -r 'to_entries|map("\(.key)=\(.value|tostring)")|.[]' <<< "$SECRETS_CONTEXT" > .env
env:
SECRETS_CONTEXT: ${{ toJson(secrets) }}

- name: Install dependencies
run: yarn install


name: CD


on:
push:
branches: [ main ]
Expand All @@ -27,8 +53,12 @@ jobs:
- name: Install dependencies
run: yarn install

- name: Build
run: yarn build
# 임시!!
- name: 리액트 빌드 무시
run: CI='false' yarn build

- name: S3 Deploy
run: aws s3 sync ./build s3://${{ secrets.AWS_S3_BUCKET }}/ --acl bucket-owner-full-control

- name: Invalidate CloudFront Cache # 새로 리소스를 업데이트할 때 기존 캐시 무효화
uses: chetan/invalidate-cloudfront-action@master
Expand Down

0 comments on commit feea2cc

Please sign in to comment.