Skip to content

feat: 7일 이내 제품 new chip 추가 #50

feat: 7일 이내 제품 new chip 추가

feat: 7일 이내 제품 new chip 추가 #50

name: deploy to aws s3
# main 브랜치에 push 될 때 현재 스크립트 실행 trigger 발동.
on:
push:
branches:
- develop
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: source code checkout
uses: actions/checkout@v2
- name: setup node.js
uses: actions/setup-node@v2
with:
node-version: "20"
- name: npm install
working-directory: .
# run 은 직접 사용하고자 하는 명령어.
run: npm install
- name: npm build
env:
VUE_APP_API_BASE_URL: ${{ secrets.BASE_URL }}
VUE_APP_MY_URL: ${{ secrets.MY_URL }}
VUE_APP_KAKAO_REDIRECT_URI: ${{ secrets.KAKAO_REDIRECT_URI }}
VUE_APP_KAKAO_CLIENT_ID: ${{ secrets.KAKAO_CLIENT_ID }}
VUE_APP_GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
VUE_APP_GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
VUE_APP_GOOGLE_REDIRECT_URI: ${{ secrets.GOOGLE_REDIRECT_URI}}
VUE_APP_PORTONE_STORE_ID: ${{ secrets.PORTONE_STORE_ID }}
VUE_APP_PORTONE_CHANNEL_KEY: ${{ secrets.PORTONE_CHANNEL_KEY }}
VUE_APP_FIREBASE_VAPID_KEY: ${{ secrets.FIREBASE_VAPID_KEY }}
VUE_APP_FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }}
working-directory: .
run: npm run build
- name: setup aws cli
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET }}
aws-region: "ap-northeast-2"
# 기존 지우고 빌드 넣어주기
- name: clear s3 bucket
run: aws s3 rm s3://www.inong.shop/ --recursive
- name: deploy to s3 bucket
run:
aws s3 cp ./dist s3://www.inong.shop/ --recursive
- name: invalidate cloudfront cache
run:
aws cloudfront create-invalidation --distribution-id E311EUF9PYKNKB --paths "/*"