From 97107836b9c64139a915698853c2909503582985 Mon Sep 17 00:00:00 2001 From: HiHoi Date: Fri, 3 Nov 2023 13:53:37 +0900 Subject: [PATCH 1/7] WIP --- src/components/CuButton.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/CuButton.tsx b/src/components/CuButton.tsx index 233b7f2..6c605cc 100644 --- a/src/components/CuButton.tsx +++ b/src/components/CuButton.tsx @@ -13,7 +13,7 @@ interface CuButtonProps { startIcon?: React.JSX.Element // 버튼 텍스트 앞에 들어갈 아이콘 endIcon?: React.JSX.Element // 버튼 텍스트 뒤에 들어갈 아이콘 fullWidth?: boolean // width: 100% - disabled?: boolean + disabled?: boolean // 버튼 비활성화 } const CuButton = ({ From dad050ca7ca56b914585c877fee5ef9589d39fb0 Mon Sep 17 00:00:00 2001 From: HiHoi Date: Fri, 3 Nov 2023 13:55:46 +0900 Subject: [PATCH 2/7] WIP --- .github/workflows/main.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 26328a7..4dff163 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,26 +12,35 @@ jobs: permissions: pull-requests: write steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - name: Checkout 🏁 + uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v2 with: - node-version: '18' + node-version: 16 + - name: Check current directory run: | echo "Current directory:" pwd echo "Directory content:" ls -la + - name: Change to project dic run: cd /home/runner/work/Peer-Frontend/Peer-Frontend + - name: Install packages run: npm i /home/runner/work/Peer-Frontend/Peer-Frontend + - name: Prettier working-directory: /home/runner/work/Peer-Frontend/Peer-Frontend run: npm run format + - name: Lint working-directory: /home/runner/work/Peer-Frontend/Peer-Frontend run: npm run lint + CD: name: Deployment runs-on: ubuntu-latest From e7ffabb6951d3c6dcd2407336efbdf258ffb0bba Mon Sep 17 00:00:00 2001 From: HiHoi Date: Fri, 3 Nov 2023 14:47:44 +0900 Subject: [PATCH 3/7] WIP --- .github/workflows/main.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4dff163..46fcf26 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,6 +11,7 @@ jobs: runs-on: ubuntu-latest permissions: pull-requests: write + steps: - name: Checkout 🏁 uses: actions/checkout@v2 @@ -28,17 +29,17 @@ jobs: ls -la - name: Change to project dic - run: cd /home/runner/work/Peer-Frontend/Peer-Frontend + run: cd /home/runner/work/Peer-Frontend - name: Install packages - run: npm i /home/runner/work/Peer-Frontend/Peer-Frontend + run: npm i /home/runner/work/Peer-Frontend - name: Prettier - working-directory: /home/runner/work/Peer-Frontend/Peer-Frontend + working-directory: /home/runner/work/Peer-Frontend run: npm run format - name: Lint - working-directory: /home/runner/work/Peer-Frontend/Peer-Frontend + working-directory: /home/runner/work/Peer-Frontend run: npm run lint CD: From 95acfabf852be9f5eceae02e1337f68d3b72ce3e Mon Sep 17 00:00:00 2001 From: HiHoi Date: Fri, 3 Nov 2023 14:48:56 +0900 Subject: [PATCH 4/7] WIP --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 46fcf26..293ea9d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,17 +29,17 @@ jobs: ls -la - name: Change to project dic - run: cd /home/runner/work/Peer-Frontend + run: cd /home/runner/work/FE_CICD/FE_CICD - name: Install packages - run: npm i /home/runner/work/Peer-Frontend + run: npm i /home/runner/work/FE_CICD/FE_CICD - name: Prettier - working-directory: /home/runner/work/Peer-Frontend + working-directory: /home/runner/work/FE_CICD/FE_CICD run: npm run format - name: Lint - working-directory: /home/runner/work/Peer-Frontend + working-directory: /home/runner/work/FE_CICD/FE_CICD run: npm run lint CD: From a87e36c12d3d630b87fb1ae7e2a27233d33ff1f8 Mon Sep 17 00:00:00 2001 From: HiHoi Date: Fri, 3 Nov 2023 15:05:17 +0900 Subject: [PATCH 5/7] WIP --- .github/workflows/main.yml | 17 ++++------------- Dockerfile | 8 ++++++++ 2 files changed, 12 insertions(+), 13 deletions(-) create mode 100644 Dockerfile diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 293ea9d..5f22590 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,21 +49,12 @@ jobs: - name: Checkout 🏁 uses: actions/checkout@v2 - - name: Setup Node.js - uses: actions/setup-node@v2 - with: - node-version: 16 - - - name: Install dependencies - run: npm install - - - name: Build - run: npm run build - - name: Build and push Docker image run: | - docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} - docker build -f Dockerfile-dev -t ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_DEV_IMAGE }} . + touch /home/runner/work/FE_CICD/FE_CICD/.env.production + echo "${{ secrets.ENV_FILE }}" >> /home/runner/work/FE_CICD/FE_CICD/.env.production + echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin + docker build -f Dockerfile -t ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_DEV_IMAGE }} . docker push ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_DEV_IMAGE }} - name: Deploy diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..93b26b2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM node:16-alpine +WORKDIR ./src/app +COPY package*.json ./ +RUN npm install +COPY . . +EXPOSE 3000 +RUN npm run build +CMD ["npm", "start"] From 55db0b7fd021409593a4648554c0079ebf841205 Mon Sep 17 00:00:00 2001 From: HiHoi Date: Fri, 3 Nov 2023 15:19:16 +0900 Subject: [PATCH 6/7] WIP --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5f22590..08b51c0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -67,6 +67,6 @@ jobs: script: | docker pull ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_DEV_IMAGE }} docker rm -f $(docker ps -qa) - docker run -d -p 80:8080 ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_DEV_IMAGE }} + docker run -d -p 80:3000 ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_DEV_IMAGE }} docker container prune -f docker image prune -f From 46829bdcf623c72d66e6f5f42bb665a3bf0b572d Mon Sep 17 00:00:00 2001 From: HiHoi Date: Fri, 3 Nov 2023 16:26:30 +0900 Subject: [PATCH 7/7] WIP --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 08b51c0..3bb0d24 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,6 +45,7 @@ jobs: CD: name: Deployment runs-on: ubuntu-latest + needs: CI steps: - name: Checkout 🏁 uses: actions/checkout@v2