Skip to content

Update prod-CD.yaml (#348) #221

Update prod-CD.yaml (#348)

Update prod-CD.yaml (#348) #221

Workflow file for this run

name: Dev CD # Workflow 이름
on: # Event 감지
push:
branches:
- develop
workflow_dispatch:
jobs: # Job 설정
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source code. # Repo checkout
uses: actions/checkout@v2
- name: Check Node v # Node v 확인
run: node -v
- name: Add GH Secrets into .env file
run: |
echo "REACT_APP_KAKAO_JAVASCRIPT_KEY=$KAKAO_JAVASCRIPT_KEY" >> .env
echo "REACT_APP_DEV_API_URL=$DEV_API_URL" >> .env
env:
KAKAO_JAVASCRIPT_KEY: ${{ secrets.KAKAO_JAVASCRIPT_KEY }}
DEV_API_URL: ${{ secrets.DEV_API_URL }}
- name: Install Dependencies # 의존 파일 설치
run: yarn install --frozen-lockfile
- name: Build # React Build
run: yarn build
- name: Deploy # Upload build file to S3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS_KEY }}
run: aws s3 cp --recursive --region ap-northeast-2 build s3://petition-bucket/dev