Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jseo9732 authored Nov 5, 2023
1 parent 7b20deb commit 436b603
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
name: CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout source code. # Repo checkout
uses: actions/checkout@v3

uses: actions/checkout@v2
- name: Check Node v # Node v 확인
run: node -v

- name: Install Dependencies # 의존 파일 설치
run: yarn install --frozen-lockfile

- name: Setting .env
run: |
echo "NEXT_PUBLIC_GOOGLE_CLIENT_ID=${{ secrets.NEXT_PUBLIC_GOOGLE_CLIENT_ID }}" >> .env
echo "REACT_APP_GOOGLE_CLIENT_ID=${{ secrets.REACT_APP_GOOGLE_CLIENT_ID }}" >> .env
- name: Build # React Build
run: yarn build

Expand All @@ -31,7 +32,8 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_IAM_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_IAM_SECRET_ACCESS_KEY }}
run: |
aws s3 cp --recursive --region ${{ secrets.AWS_REGION }} out s3://${{ secrets.AWS_BUCKET_NAME }}
aws s3 cp --recursive --region ${{ secrets.AWS_REGION }} build s3://${{ secrets.AWS_BUCKET_NAME }}
- name: CloudFront 캐시 무효화
env:
AWS_S3_BUCKET: ${{ secrets.AWS_BUCKET_NAME }}
Expand Down

0 comments on commit 436b603

Please sign in to comment.