From 6f187e8971576e6e711f2ea1d02ff0e888e24454 Mon Sep 17 00:00:00 2001 From: rbgksqkr Date: Sun, 5 Jan 2025 23:37:17 +0900 Subject: [PATCH 01/10] =?UTF-8?q?chore:=20=EB=A1=9C=EC=BB=AC=ED=98=B8?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=ED=8F=AC=ED=8A=B8=203000=EB=B2=88=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=20#457?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend-admin/vite.config.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend-admin/vite.config.ts b/frontend-admin/vite.config.ts index c9dfe59f..ebec9b3f 100644 --- a/frontend-admin/vite.config.ts +++ b/frontend-admin/vite.config.ts @@ -3,6 +3,9 @@ import react from '@vitejs/plugin-react'; // https://vite.dev/config/ export default defineConfig({ + server: { + port: 3000, + }, plugins: [ react({ jsxImportSource: '@emotion/react', From 990f80be368dbca4c4be2c8c8efb9231c0853bab Mon Sep 17 00:00:00 2001 From: rbgksqkr Date: Sun, 5 Jan 2025 23:37:41 +0900 Subject: [PATCH 02/10] =?UTF-8?q?fix:=20fetcher=20=ED=97=A4=EB=8D=94?= =?UTF-8?q?=EC=97=90=20Content-Type=20=EC=A0=9C=EB=8C=80=EB=A1=9C=20?= =?UTF-8?q?=EC=95=88=EB=93=A4=EC=96=B4=EA=B0=80=EB=8A=94=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=ED=95=B4=EA=B2=B0=20#457?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend-admin/src/apis/fetcher.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend-admin/src/apis/fetcher.ts b/frontend-admin/src/apis/fetcher.ts index 84db3e46..b5f251ed 100644 --- a/frontend-admin/src/apis/fetcher.ts +++ b/frontend-admin/src/apis/fetcher.ts @@ -8,7 +8,10 @@ interface RequestProps { type FetchProps = Omit; const fetcher = { - async request(url: string, { method, body, headers, auth = true }: RequestProps) { + async request( + url: string, + { method, body, headers = { 'Content-Type': 'application/json' }, auth = true }: RequestProps, + ) { try { const response = await fetch(url, { method, From fcef643447369803e7ec22d3166a66c9f350cedc Mon Sep 17 00:00:00 2001 From: rbgksqkr Date: Mon, 6 Jan 2025 00:14:43 +0900 Subject: [PATCH 03/10] =?UTF-8?q?chore:=20ci=20=EC=8A=A4=ED=81=AC=EB=A6=BD?= =?UTF-8?q?=ED=8A=B8=20=EC=9E=91=EC=84=B1=20#457?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-ci-admin.yml | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/fe-ci-admin.yml diff --git a/.github/workflows/fe-ci-admin.yml b/.github/workflows/fe-ci-admin.yml new file mode 100644 index 00000000..27fb262e --- /dev/null +++ b/.github/workflows/fe-ci-admin.yml @@ -0,0 +1,43 @@ +name: FE Build for admin + +on: + pull_request: + branches: + - develop + paths: + - "frontend-admin/**" + +jobs: + build-and-test: + runs-on: ubuntu-latest + + defaults: + run: + working-directory: ./frontend-admin + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + cache: "pnpm" + cache-dependency-path: frontend-admin/pnpm-lock.yaml + + - name: Install Dependencies + run: npm install + working-directory: ./frontend-admin + + - name: Cache node_modules + id: cache + uses: actions/cache@v3 + with: + path: "**/node_modules" + key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Build + run: pnpm build + working-directory: ./frontend-admin From 1588f5463d533856428ee4e58a6372a577501659 Mon Sep 17 00:00:00 2001 From: rbgksqkr Date: Mon, 6 Jan 2025 00:15:06 +0900 Subject: [PATCH 04/10] =?UTF-8?q?chore:=20cd=20=EC=8A=A4=ED=81=AC=EB=A6=BD?= =?UTF-8?q?=ED=8A=B8=20=EC=9E=91=EC=84=B1=20#457?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd-admin.yml | 62 +++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/fe-cd-admin.yml diff --git a/.github/workflows/fe-cd-admin.yml b/.github/workflows/fe-cd-admin.yml new file mode 100644 index 00000000..9778fce2 --- /dev/null +++ b/.github/workflows/fe-cd-admin.yml @@ -0,0 +1,62 @@ +name: FE Build for admin + +on: + push: + branches: ["main", "develop"] + paths: + - "frontend-admin/**" + +jobs: + build-and-test: + runs-on: ubuntu-latest + + defaults: + run: + working-directory: ./frontend-admin + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + cache: "pnpm" + cache-dependency-path: frontend-admin/pnpm-lock.yaml + + - name: Generate .env File + working-directory: ./frontend + run: | + echo "API_BASE_URL=${{ secrets.API_BASE_URL_PROD }}" >> .env + + - name: Install Dependencies + run: npm install + working-directory: ./frontend-admin + + - name: Cache node_modules + id: cache + uses: actions/cache@v3 + with: + path: "**/node_modules" + key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Build + run: pnpm build + working-directory: ./frontend-admin + + - name: Configure AWS CLI + run: | + aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} + aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws configure set default.region ${{ secrets.AWS_REGION }} + + - name: Upload to S3 (Admin) + working-directory: ./frontend-admin/dist + run: | + aws s3 sync . s3://${{ secrets.AWS_S3_BUCKET_ADMIN }} --delete + + - name: Invalidate CloudFront Cache (Admin) + run: | + aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID_ADMIN }} --paths "/*" From d0e97450c3ef6673e31f20e02a2a59ff0e894b15 Mon Sep 17 00:00:00 2001 From: rbgksqkr Date: Mon, 6 Jan 2025 00:17:48 +0900 Subject: [PATCH 05/10] =?UTF-8?q?fix:=20env=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EA=B2=BD=EB=A1=9C=20=EC=88=98=EC=A0=95=20#457?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd-admin.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fe-cd-admin.yml b/.github/workflows/fe-cd-admin.yml index 9778fce2..5e170411 100644 --- a/.github/workflows/fe-cd-admin.yml +++ b/.github/workflows/fe-cd-admin.yml @@ -1,4 +1,4 @@ -name: FE Build for admin +name: FE Deploy for admin on: push: @@ -25,7 +25,7 @@ jobs: cache-dependency-path: frontend-admin/pnpm-lock.yaml - name: Generate .env File - working-directory: ./frontend + working-directory: ./frontend-admin run: | echo "API_BASE_URL=${{ secrets.API_BASE_URL_PROD }}" >> .env From 7ca221e5237342cf0cf6d4d94221dbc3eee9812c Mon Sep 17 00:00:00 2001 From: rbgksqkr Date: Mon, 6 Jan 2025 01:28:55 +0900 Subject: [PATCH 06/10] =?UTF-8?q?fix:=20pnpm=20=EB=AA=85=EB=A0=B9=EC=96=B4?= =?UTF-8?q?=20=EC=98=A4=EB=A5=98=EB=A1=9C=20=EC=9D=B8=ED=95=B4=20npm?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD=20#457?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd-admin.yml | 8 ++++---- .github/workflows/fe-ci-admin.yml | 8 ++++---- .../src/styles/{GlobalStyle.ts => globalStyle.ts} | 0 3 files changed, 8 insertions(+), 8 deletions(-) rename frontend-admin/src/styles/{GlobalStyle.ts => globalStyle.ts} (100%) diff --git a/.github/workflows/fe-cd-admin.yml b/.github/workflows/fe-cd-admin.yml index 5e170411..245718e9 100644 --- a/.github/workflows/fe-cd-admin.yml +++ b/.github/workflows/fe-cd-admin.yml @@ -21,8 +21,8 @@ jobs: uses: actions/setup-node@v4 with: node-version: "20" - cache: "pnpm" - cache-dependency-path: frontend-admin/pnpm-lock.yaml + cache: "npm" + cache-dependency-path: frontend-admin/package-lock.json - name: Generate .env File working-directory: ./frontend-admin @@ -38,12 +38,12 @@ jobs: uses: actions/cache@v3 with: path: "**/node_modules" - key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }} + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node- - name: Build - run: pnpm build + run: npm run build working-directory: ./frontend-admin - name: Configure AWS CLI diff --git a/.github/workflows/fe-ci-admin.yml b/.github/workflows/fe-ci-admin.yml index 27fb262e..aaa99a94 100644 --- a/.github/workflows/fe-ci-admin.yml +++ b/.github/workflows/fe-ci-admin.yml @@ -22,8 +22,8 @@ jobs: uses: actions/setup-node@v4 with: node-version: "20" - cache: "pnpm" - cache-dependency-path: frontend-admin/pnpm-lock.yaml + cache: "npm" + cache-dependency-path: frontend-admin/package-lock.json - name: Install Dependencies run: npm install @@ -34,10 +34,10 @@ jobs: uses: actions/cache@v3 with: path: "**/node_modules" - key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }} + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node- - name: Build - run: pnpm build + run: npm run build working-directory: ./frontend-admin diff --git a/frontend-admin/src/styles/GlobalStyle.ts b/frontend-admin/src/styles/globalStyle.ts similarity index 100% rename from frontend-admin/src/styles/GlobalStyle.ts rename to frontend-admin/src/styles/globalStyle.ts From 722136f2a406f69b12b789348656114f192c2f1c Mon Sep 17 00:00:00 2001 From: rbgksqkr Date: Mon, 6 Jan 2025 01:35:47 +0900 Subject: [PATCH 07/10] =?UTF-8?q?chore:=20ci=20package=20cache=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=EB=A1=9C=20=EC=9D=B8=ED=95=B4=20=EC=A0=9C=EA=B1=B0=20?= =?UTF-8?q?#457?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd-admin.yml | 13 ------------- .github/workflows/fe-ci-admin.yml | 13 ------------- 2 files changed, 26 deletions(-) diff --git a/.github/workflows/fe-cd-admin.yml b/.github/workflows/fe-cd-admin.yml index 245718e9..18100fb7 100644 --- a/.github/workflows/fe-cd-admin.yml +++ b/.github/workflows/fe-cd-admin.yml @@ -19,10 +19,6 @@ jobs: - name: Use Node.js uses: actions/setup-node@v4 - with: - node-version: "20" - cache: "npm" - cache-dependency-path: frontend-admin/package-lock.json - name: Generate .env File working-directory: ./frontend-admin @@ -33,15 +29,6 @@ jobs: run: npm install working-directory: ./frontend-admin - - name: Cache node_modules - id: cache - uses: actions/cache@v3 - with: - path: "**/node_modules" - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - name: Build run: npm run build working-directory: ./frontend-admin diff --git a/.github/workflows/fe-ci-admin.yml b/.github/workflows/fe-ci-admin.yml index aaa99a94..3bf3444d 100644 --- a/.github/workflows/fe-ci-admin.yml +++ b/.github/workflows/fe-ci-admin.yml @@ -20,24 +20,11 @@ jobs: - name: Use Node.js uses: actions/setup-node@v4 - with: - node-version: "20" - cache: "npm" - cache-dependency-path: frontend-admin/package-lock.json - name: Install Dependencies run: npm install working-directory: ./frontend-admin - - name: Cache node_modules - id: cache - uses: actions/cache@v3 - with: - path: "**/node_modules" - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - name: Build run: npm run build working-directory: ./frontend-admin From 93e66dd9eb8e44f9a1b96198a99dd994f9dd3449 Mon Sep 17 00:00:00 2001 From: rbgksqkr Date: Sun, 12 Jan 2025 19:34:43 +0900 Subject: [PATCH 08/10] =?UTF-8?q?fix:=20category=20api=20url=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20#457?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend-admin/src/constants/url.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend-admin/src/constants/url.ts b/frontend-admin/src/constants/url.ts index 2909921c..e0ce17a6 100644 --- a/frontend-admin/src/constants/url.ts +++ b/frontend-admin/src/constants/url.ts @@ -8,7 +8,7 @@ export const API_URL = { contents: `${BASE_URL}/api/admin/balances/contents`, options: `${BASE_URL}/api/admin/balances/options`, deleteContent: (contentId: number) => `${BASE_URL}/api/admin/balances/contents/${contentId}`, - categoryList: `${BASE_URL}/api/admin/balances/categories`, + categoryList: `${BASE_URL}/api/balances/categories`, }; export const MOCK_API_URL = { @@ -18,5 +18,5 @@ export const MOCK_API_URL = { contents: `${BASE_URL}/api/admin/balances/contents`, options: `${BASE_URL}/api/admin/balances/options`, deleteContent: `${BASE_URL}/api/admin/balances/contents/:contentId`, - categoryList: `${BASE_URL}/api/admin/balances/categories`, + categoryList: `${BASE_URL}/api/balances/categories`, }; From 3b0bfc51778240a90a529aeb5c749f8058a0c17e Mon Sep 17 00:00:00 2001 From: rbgksqkr Date: Sun, 12 Jan 2025 19:34:54 +0900 Subject: [PATCH 09/10] =?UTF-8?q?chore:=20=EC=9B=B9=20=ED=8F=B0=ED=8A=B8?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80=20#457?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend-admin/index.html | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/frontend-admin/index.html b/frontend-admin/index.html index 85efa5b8..fe7c8b8f 100644 --- a/frontend-admin/index.html +++ b/frontend-admin/index.html @@ -1,10 +1,23 @@ - + 땅콩 admin + + +
From 7b3d4bf78c85ddfcd9504b7038a553c9086cc93c Mon Sep 17 00:00:00 2001 From: rbgksqkr Date: Sun, 12 Jan 2025 19:38:31 +0900 Subject: [PATCH 10/10] =?UTF-8?q?chore:=20admin=20base=20url=20=ED=99=98?= =?UTF-8?q?=EA=B2=BD=EB=B3=80=EC=88=98=EB=AA=85=20=EC=88=98=EC=A0=95=20#45?= =?UTF-8?q?7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fe-cd-admin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fe-cd-admin.yml b/.github/workflows/fe-cd-admin.yml index 18100fb7..bcb25186 100644 --- a/.github/workflows/fe-cd-admin.yml +++ b/.github/workflows/fe-cd-admin.yml @@ -23,7 +23,7 @@ jobs: - name: Generate .env File working-directory: ./frontend-admin run: | - echo "API_BASE_URL=${{ secrets.API_BASE_URL_PROD }}" >> .env + echo "VITE_API_BASE_URL=${{ secrets.API_BASE_URL_PROD }}" >> .env - name: Install Dependencies run: npm install