From 31d12371451e700a0d6028310a077874d06dfb5b Mon Sep 17 00:00:00 2001 From: teagu123 <103398790+teagu123@users.noreply.github.com> Date: Mon, 13 May 2024 15:49:13 +0900 Subject: [PATCH] =?UTF-8?q?2=EA=B8=B0=20Readme=20=EC=88=98=EC=A0=95=20=20?= =?UTF-8?q?=EB=B0=8F=20axios=20issue=20=EC=B2=98=EB=A6=AC=20(#70)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test: dockerfile 테스트 * test: dockerfile 테스트2 * test: dockerfile 테스트3 * test: dockerfile 테스트4 * test: dockerfile 테스트5 * test: 도커파일 원복.. * chore: yarn 삭제 * feat: 도커파일 수정 * fix: browserlist-db 업데이트 * feat: CI=true -> CI=false * feat: 깃허브액션 시크릿 추가 * 04.11 이슈 해결 적용 (#68) * fix: 13812 -> 13813 * fix: 내정보수정 파트 '기획디자인' 제거 * design : 사진 크기에 맞게 사이즈 조정 * design : cover로 수정 * fix : 원래대로 돌려놓기 * refactor: prettier 형식으로 코드 수정 * 초기 리팩토링 및 버그수정 (#60) * Rename :폴더 구조 수정 (Pages) * Rename : axios 폴더 위치 변경 * Remove : 파일 이동으로 인한 삭제 * Rename : 폴더 구조 변경중 * Remove : 폴더 구조 변경 * Fix : Part 변경 이슈 해결 (Frontend, Design) * Rename : interface폴더 생성 * Rename : login, signup 파일 구조 변경 * Remove : 폴더 구조 변경 최종 * Docs: Issue & PR Template 추가 --------- Co-authored-by: KimKyuHoi * Rename: Template 폴더명 수정 * Remove: IssueTemplate 삭제 * Rename: Issue 템플릿 재생성 * Fix: 어드민 페이지 유저 테이블 이메일 텍스트 줄바꿈처리 (#66) * 메인페이지 제목 중앙 정렬 (#67) * Fix:랜딩페이지 제목 중앙정렬 수정 * Fix: 랜딩페이지 제목 중앙정렬 수정 --------- Co-authored-by: sangah * super admin 대학교 검색 오류 해결 (#64) * Rename :폴더 구조 수정 (Pages) * Rename : axios 폴더 위치 변경 * Remove : 파일 이동으로 인한 삭제 * Rename : 폴더 구조 변경중 * Remove : 폴더 구조 변경 * Fix : Part 변경 이슈 해결 (Frontend, Design) * Rename : interface폴더 생성 * Rename : login, signup 파일 구조 변경 * Remove : 폴더 구조 변경 최종 * Docs: Issue & PR Template 추가 * Fix: superAdmin 대학교 검색 기능 수정 * Style: useEffect 병합 * Fix: react hook useEffect dependency warning 해결 --------- Co-authored-by: DevTeddy123 Co-authored-by: KimKyuHoi Co-authored-by: teagu123 <103398790+teagu123@users.noreply.github.com> --------- Co-authored-by: byeong Co-authored-by: Ariling <97501226+Ariling@users.noreply.github.com> Co-authored-by: 김진호 Co-authored-by: KimKyuHoi Co-authored-by: 김규회 <48755156+KimKyuHoi@users.noreply.github.com> Co-authored-by: Ivoryeee <105477246+Ivoryeee@users.noreply.github.com> Co-authored-by: sangah Co-authored-by: Dongpil Jo <91816664+eastfilmm@users.noreply.github.com> * Fix : local상태 이슈 체크 * Feat : GA 추가 * Docs : readme수정 2기 버전 * Fix : 이슈 처리 --------- Co-authored-by: JinHo Kim <81083461+jinhokim98@users.noreply.github.com> Co-authored-by: 김진호 Co-authored-by: byeong Co-authored-by: Ariling <97501226+Ariling@users.noreply.github.com> Co-authored-by: KimKyuHoi Co-authored-by: 김규회 <48755156+KimKyuHoi@users.noreply.github.com> Co-authored-by: Ivoryeee <105477246+Ivoryeee@users.noreply.github.com> Co-authored-by: sangah Co-authored-by: Dongpil Jo <91816664+eastfilmm@users.noreply.github.com> --- .github/workflows/stag-client-deploy.yml | 100 ++++++++++++----------- Dockerfile | 18 ++-- README.md | 47 ++--------- package-lock.json | 19 +++-- package.json | 1 + src/api/axios.ts | 1 - src/index.tsx | 9 ++ 7 files changed, 92 insertions(+), 103 deletions(-) diff --git a/.github/workflows/stag-client-deploy.yml b/.github/workflows/stag-client-deploy.yml index 50807efa..31b6e7aa 100644 --- a/.github/workflows/stag-client-deploy.yml +++ b/.github/workflows/stag-client-deploy.yml @@ -1,51 +1,57 @@ name: stag-client-deploy -on: - push: - branches: [ "stag" ] - workflow_dispatch: +on: + push: + branches: ['stag'] + workflow_dispatch: jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Setup Node.js environment - uses: actions/setup-node@v2.5.2 - with: - node-version: lts/Hydrogen - - - name: Install Dependencies - run: npm install - - - name: Build - run: npm run build - - - name: Docker login - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_EMAIL }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - - - name: Build and push - uses: docker/build-push-action@v3 - with: - context: . - file: ./Dockerfile - platforms: linux/amd64 - push: true - tags: ${{ secrets.DOCKER_CLIENT_STAG_IMAGE }} - - - name: client-deploy - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.SSH_HOST }} - username: ${{ secrets.SSH_USERNAME }} - key: ${{ secrets.SSH_KEY }} - script: | - sudo docker rm -f ${{ secrets.DOCKER_CLIENT_STAG_CONTAINER }} - sudo docker rmi ${{ secrets.DOCKER_CLIENT_STAG_IMAGE }} - sudo docker-compose -f ${{ secrets.DOCKER_COMPOSE_DIRECTORY }} up -d - sudo docker image prune -f - + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup Node.js environment + uses: actions/setup-node@v2.5.2 + with: + node-version: lts/Hydrogen + + - name: set up secrets + run: | + echo "REACT_APP_REST_API_KEY=${{secrets.REACT_APP_REST_API_KEY}}" >> .env + echo "REACT_APP_GOOGLE_CLIENT_ID=${{secrets.REACT_APP_GOOGLE_CLIENT_ID}}" >> .env + echo "REACT_APP_REDIRECT_URI=${{secrets.REACT_APP_REDIRECT_URI}}" >> .env + echo "REACT_APP_GOOGLE_REDIRECT_URI=${{secrets.REACT_APP_GOOGLE_REDIRECT_URI}}" >> .env + - run: cat .env + - name: Install Dependencies + run: npm install + + - name: Build + run: CI=false npm run build + + - name: Docker login + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_EMAIL }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + + - name: Build and push + uses: docker/build-push-action@v3 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64 + push: true + tags: ${{ secrets.DOCKER_CLIENT_STAG_IMAGE }} + + - name: client-deploy + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USERNAME }} + key: ${{ secrets.SSH_KEY }} + script: | + sudo docker rm -f ${{ secrets.DOCKER_CLIENT_STAG_CONTAINER }} + sudo docker rmi ${{ secrets.DOCKER_CLIENT_STAG_IMAGE }} + sudo docker-compose -f ${{ secrets.DOCKER_COMPOSE_DIRECTORY }} up -d + sudo docker image prune -f diff --git a/Dockerfile b/Dockerfile index 2d089497..b806aedb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,13 @@ FROM node:20.7.0 - + +WORKDIR /app + +COPY . . + +RUN npm install + RUN npm install -g serve - + RUN CI='false' npm run build - -RUN mkdir ./build - -COPY ./build ./build - -ENTRYPOINT ["serve", "-s", "build"] + +ENTRYPOINT ["serve", "-s", "build"] \ No newline at end of file diff --git a/README.md b/README.md index c617caa2..ae249abd 100644 --- a/README.md +++ b/README.md @@ -1,47 +1,10 @@ # LikelionUniv_FrontEnd🦁 -2023 멋쟁이사자처럼 대학 통합 웹사이트 1기 프론트앤드 팀레포입니다 +2024 멋쟁이사자처럼 대학 통합 웹사이트 2기 프론트엔드 팀레포입니다 ## FrontEnd Team Member -### Team Leader of 🦁 - -| 양화영 | -|:---------------------------------------------------------------------------------:| -| | -| [@hwayeong](https://github.com/sanchaehwa) | - -### 🧑🏻‍💻 Login Page & MyPage Developer - -| 최병찬 | -|:--------------------------------------------------------------------------------:| -| | -| [@ByeongChan Choi](https://github.com/chan-byeong) | - -### 🧑🏻‍💻 CommunityPage Developer - -| 안재현 | -|:--------------------------------------------------------------------------------:| -| | -| [@JaeHyun Ahn](https://github.com/JaeHyunGround) | - -### 🧑🏻‍💻 Admin Page & Landing Page Developer - -| 김강민 | 이서진 | -|:--------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------:| -| | | -| [@Kangmin Kim](https://github.com/WithKKM) | [@529539](https://github.com/529539) | - -### 🧑🏻‍💻 Project Page Developer - -| 양화영 | 한영준 | 김진호 | -|:---------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------:| -------------------------------------------------------------------------------- | -| | | | -| [@hwayeong](https://github.com/sanchaehwa) | [@zizonyoungjun](https://github.com/zizonyoungjun) | [@jinhokim98](https://github.com/jinhokim98) | - -### 🧑🏻‍💻 Recruiting Page Developer - -| 김예지 | 노하림 | 임정민 | -|:---------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------:| -| | | | -| [@mnbvcxzyj](https://github.com/mnbvcxzyj) | [@harim061](https://github.com/harim061) | [@JeongMinIsBest](https://github.com/JeongMinIsBest) | +| 프론트엔드 (파트장) | 프론트엔드 | 프론트엔드 | 프론트엔드 | +| :-----------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------: | +| teagu123 | KimKyuHoi | eastfilmm | Ivoryeee | +| 김태기 | 김규회 | 조동필 | 박상아 | diff --git a/package-lock.json b/package-lock.json index 8cd34d39..cdecf482 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,6 +27,7 @@ "react": "^18.2.0", "react-datepicker": "^6.1.0", "react-dom": "^18.2.0", + "react-ga": "^3.3.1", "react-hook-form": "^7.48.2", "react-js-pagination": "^3.0.3", "react-modal": "^3.16.1", @@ -6180,9 +6181,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001517", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001517.tgz", - "integrity": "sha512-Vdhm5S11DaFVLlyiKu4hiUTkpZu+y1KA/rZZqVQfOD5YdDT/eQKlkt7NaE0WGOFgX32diqt9MiP9CAiFeRklaA==", + "version": "1.0.30001617", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001617.tgz", + "integrity": "sha512-mLyjzNI9I+Pix8zwcrpxEbGlfqOkF9kM3ptzmKNw5tizSyYwMe+nGLTqMK9cO+0E+Bh6TsBxNAaHWEM8xwSsmA==", "funding": [ { "type": "opencollective", @@ -6196,8 +6197,7 @@ "type": "github", "url": "https://github.com/sponsors/ai" } - ], - "license": "CC-BY-4.0" + ] }, "node_modules/case-sensitive-paths-webpack-plugin": { "version": "2.4.0", @@ -14301,6 +14301,15 @@ "integrity": "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==", "dev": true }, + "node_modules/react-ga": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/react-ga/-/react-ga-3.3.1.tgz", + "integrity": "sha512-4Vc0W5EvXAXUN/wWyxvsAKDLLgtJ3oLmhYYssx+YzphJpejtOst6cbIHCIyF50Fdxuf5DDKqRYny24yJ2y7GFQ==", + "peerDependencies": { + "prop-types": "^15.6.0", + "react": "^15.6.2 || ^16.0 || ^17 || ^18" + } + }, "node_modules/react-hook-form": { "version": "7.48.2", "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.48.2.tgz", diff --git a/package.json b/package.json index ed6d8971..d91dce00 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "react": "^18.2.0", "react-datepicker": "^6.1.0", "react-dom": "^18.2.0", + "react-ga": "^3.3.1", "react-hook-form": "^7.48.2", "react-js-pagination": "^3.0.3", "react-modal": "^3.16.1", diff --git a/src/api/axios.ts b/src/api/axios.ts index 99add8a8..a0015869 100644 --- a/src/api/axios.ts +++ b/src/api/axios.ts @@ -36,7 +36,6 @@ axiosInstance.interceptors.response.use( const axiosError = customError.response?.data as IError; const { config } = error; - console.log(axiosError.code); // 리프레시도 만료된 경우나 잘못된 토큰인 경우 if (axiosError?.code === 'TOKEN_401_1') { diff --git a/src/index.tsx b/src/index.tsx index f681c5c4..86f194dd 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -6,6 +6,7 @@ import { RecoilRoot } from 'recoil'; import './styles/font.css'; import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import ReactGA from 'react-ga'; // stale time 10분으로 설정 const queryClient = new QueryClient({ @@ -18,6 +19,14 @@ const queryClient = new QueryClient({ }, }); +//Google Analytics +// const gaTrackingId = process.env.REACT_APP_GOOGLE_ANALYTICS_TRACKING_ID; // 환경 변수에 저장된 추적ID 가져오기 + +// if (gaTrackingId) { +// ReactGA.initialize(gaTrackingId, { debug: true }); +// ReactGA.pageview(window.location.pathname); +// } + const root = ReactDOM.createRoot( document.getElementById('root') as HTMLElement, );