Skip to content

Merge pull request #98 from next-petree/feat_login #110

Merge pull request #98 from next-petree/feat_login

Merge pull request #98 from next-petree/feat_login #110

Workflow file for this run

name: CI/CD
# 'boilerPlate' λΈŒλžœμΉ˜μ— ν‘Έμ‹œλ  λ•Œ μ›Œν¬ν”Œλ‘œμš°λ₯Ό μ‹€ν–‰
on:
push:
branches:
- boilerPlate
# μž‘μ—… μ •μ˜
jobs:
build:
# 이 μž‘μ—…μ€ μš°λΆ„νˆ¬ μ΅œμ‹  λ²„μ „μ—μ„œ μ‹€ν–‰
runs-on: ubuntu-latest
steps:
# 1단계: λ ˆν¬μ§€ν† λ¦¬ μ½”λ“œ 체크아웃
- name: Checkout source code
uses: actions/checkout@v2
# 2단계: μš°λΆ„νˆ¬ 버전을 확인 (선택)
- name: Check Ubuntu version
run: lsb_release -a
# 3단계: ν™˜κ²½ λ³€μˆ˜ 파일 생성
- name: Create env file
run: |
touch .env
echo REACT_APP_API_URL=${{ secrets.REACT_APP_API_URL }} >> .env
echo REACT_APP_KAKAO_REST_API=${{ secrets.REACT_APP_KAKAO_REST_API }} >> .env
echo REACT_APP_KAKAO_REDIRECT_URI=${{ secrets.REACT_APP_KAKAO_REDIRECT_URI }} >> .env
cat .env
# 4단계: ν”„λ‘œμ νŠΈ μ˜μ‘΄μ„±μ„ μ„€μΉ˜
- name: Install dependencies
run: npm install
# 5단계: ν”„λ‘œμ νŠΈλ₯Ό λΉŒλ“œ
- name: Build
run: npm run build
# 6단계: AWS CLI 버전 ν‘œμ‹œ(선택)
- name: SHOW AWS CLI VERSION
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: aws --version
# 7단계: λΉŒλ“œ νŒŒμΌμ„ S3 버킷에 동기화.
- name: Sync Bucket
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws s3 sync \
--region ap-northeast-2 \
build s3://petree-front\
--delete