Refactor : 전체 페이지 길이 get 로직 추가, 검색어 입력에 따른 분기 처리 #26
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: CI/CD | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
- name: Set Environment Variable | |
run: echo "VITE_PROXY_URL=$VITE_PROXY_URL" >> .env.production | |
env: | |
VITE_PROXY_URL: ${{ secrets.VITE_PROXY_URL }} | |
- name: Install dependencies | |
run: npm install | |
- name: Build | |
run: npm run build | |
- name: deploy to s3 | |
uses: jakejarvis/s3-sync-action@master | |
with: | |
args: --delete | |
env: | |
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: 'ap-northeast-2' | |
SOURCE_DIR: 'dist' |