Merge pull request #69 from DPS0340/chore/bump-axios-version #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Expo build | |
on: | |
push: # master Branch에서 push 이벤트가 일어났을 때만 실행 | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-18.04 | |
steps: | |
- name: Checkout source code. # 레포지토리 체크아웃 | |
uses: actions/checkout@master | |
- name: Cache node modules # node modules 캐싱 | |
uses: actions/cache@v1 | |
with: | |
path: node_modules | |
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.OS }}-build- | |
${{ runner.OS }}- | |
- name: Display the path | |
run: pwd && ls | |
- name: Install Expo-cli # 의존 파일 설치 | |
run: sudo npm install -g expo-cli | |
- name: Install Dependencies | |
run: npm install | |
- name: Build # React Build | |
run: expo build:web | |
- name: Deploy # S3에 배포하기 | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
run: | | |
aws s3 cp \ | |
--recursive \ | |
--region ap-northeast-2 \ | |
--acl public-read \ | |
web-build s3://expocrudboard # | |
- name: Invalidate CloudFront | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
run: aws cloudfront create-invalidation --distribution-id EJN871H4XOZA7 --paths "/*" |