Skip to content

Merge pull request #85 from JangGusWjd/fix/router #16

Merge pull request #85 from JangGusWjd/fix/router

Merge pull request #85 from JangGusWjd/fix/router #16

Workflow file for this run

name: MajorIn
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source code. # 레포지토리 체크아웃
uses: actions/checkout@v4
- name: Cache node modules # node modules 캐싱
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Set up Node.js
uses: actions/setup-node@v3 # 최신 버전으로 업데이트
with:
node-version: "18.17.0" # 사용 중인 Node.js 버전 설정
- name: Install Dependencies # 의존 파일 설치
run: npm install
- name: Update Browserslist DB
run: npx update-browserslist-db@latest
- name: Build # React Build
env:
CI: false # 경고를 오류로 처리하지 않도록 설정
run: npm run build
- 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 \
build s3://majorin