Skip to content

feat : lint 스크립트 작성 밑 lint오류 수정 #19 #2

feat : lint 스크립트 작성 밑 lint오류 수정 #19

feat : lint 스크립트 작성 밑 lint오류 수정 #19 #2

name: Frontend Deploy # action 명
on: # 이벤트 트리거
push: # push event에 반응
paths:
- "client/**" # client의 변경이 있을 때
branches: # github repository의 branch가
- master # master 일 경우만
jobs:
deploy: # GitHub-hosted runners env
runs-on: macos-latest # using MacOS
defaults:
run:
working-directory: "client" # client 폴더에서 실행
steps:
- uses: actions/checkout@v3
- name: Set Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install dependencies
run: npm install
- name: Build page
run: npm run build
- name: Authenticate AWS CLI
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
run: |
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
aws configure set default.region $AWS_REGION
- name: remove # 삭제
run: |
aws cloudfront create-invalidation \
--distribution-id ${{ secrets.AWS_CloudFront_ID }} \
--paths "/*"
- name: deploy # 배포
run: |
aws s3 sync ./build s3://sheepdog13.blog --profile=sheepdog13