diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f655f23..fa27a27 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,10 +1,10 @@ name: CI on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] jobs: build: @@ -12,17 +12,18 @@ jobs: 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 @@ -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 }}