From 3649fc829c13eb9e471719e2e97c80cf85184a98 Mon Sep 17 00:00:00 2001 From: Dohyeon Date: Fri, 27 Mar 2026 23:56:06 +0900 Subject: [PATCH 1/3] =?UTF-8?q?chore:=20ci/cd=20=EA=B5=AC=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 33 +++++++++++++++++++ .github/workflows/deploy-pages.yml | 52 ++++++++++++++++++++++++++++++ src/app/App.tsx | 5 ++- 3 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/deploy-pages.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..69ccc53 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +name: CI + +on: + pull_request: + push: + branches: [dev, main] + +concurrency: + group: ci-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + quality: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: npm + + - name: Install dependencies + run: npm ci + + - name: ESLint + run: npm run lint + + - name: Prettier + run: npm run format:check + + - name: Typecheck & production build + run: npm run build diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml new file mode 100644 index 0000000..f67f47a --- /dev/null +++ b/.github/workflows/deploy-pages.yml @@ -0,0 +1,52 @@ +# GitHub 저장소 Settings → Pages → Source: GitHub Actions 로 설정해야 합니다. +# 기본 도메인 예: https://.github.io// +# 배포 브랜치는 아래 branches 에서 필요하에 맞게 바꾸면 됩니다 (예: main 만). + +name: Deploy GitHub Pages + +on: + push: + branches: [main] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: npm + + - run: npm ci + - run: npm run lint + - run: npm run format:check + + - name: Build for GitHub Pages + run: npm run build -- --base=/${{ github.event.repository.name }}/ + + - uses: actions/upload-pages-artifact@v3 + with: + path: dist + + + deploy: + runs-on: ubuntu-latest + needs: build + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - id: deployment + uses: actions/deploy-pages@v4 diff --git a/src/app/App.tsx b/src/app/App.tsx index 453d449..4ffe38a 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -25,9 +25,12 @@ function MobileRouteLayoutWithDocbar() { ) } +const routerBasename = + import.meta.env.BASE_URL.replace(/\/$/, '') || undefined + export function App() { return ( - + }> } /> From ea81175335550db48be30ad9df169db6be6c69c7 Mon Sep 17 00:00:00 2001 From: Dohyeon Date: Sat, 28 Mar 2026 00:00:18 +0900 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20prettier=20=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/App.tsx | 11 +- src/pages/login/index.tsx | 146 ++++++++++----------- src/pages/manager/home/index.tsx | 138 +++++++++---------- src/pages/user/home/index.tsx | 60 ++++----- src/pages/user/job-lookup-map/index.tsx | 20 +-- src/pages/user/schedule/index.tsx | 128 +++++++++--------- src/pages/user/workspace-members/index.tsx | 106 +++++++-------- src/shared/ui/MobileLayout.tsx | 2 +- src/shared/ui/MobileLayoutWithDocbar.tsx | 4 +- 9 files changed, 310 insertions(+), 305 deletions(-) diff --git a/src/app/App.tsx b/src/app/App.tsx index 4ffe38a..66bcd6d 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -1,4 +1,10 @@ -import { BrowserRouter, Routes, Route, Navigate, Outlet } from 'react-router-dom' +import { + BrowserRouter, + Routes, + Route, + Navigate, + Outlet, +} from 'react-router-dom' import { ManagerHomePage } from '@/pages/manager/home' import { LoginPage } from '@/pages/login' import { SignupPage } from '@/pages/signup' @@ -25,8 +31,7 @@ function MobileRouteLayoutWithDocbar() { ) } -const routerBasename = - import.meta.env.BASE_URL.replace(/\/$/, '') || undefined +const routerBasename = import.meta.env.BASE_URL.replace(/\/$/, '') || undefined export function App() { return ( diff --git a/src/pages/login/index.tsx b/src/pages/login/index.tsx index 20b09cf..f6bd1b9 100644 --- a/src/pages/login/index.tsx +++ b/src/pages/login/index.tsx @@ -72,87 +72,87 @@ export function LoginPage() { return (
- 알터 로고 - -
-
- { - setPhone(formatPhone(e.target.value)) - setPhoneError('') - setErrorMessage('') - }} - borderColor={phoneError ? '1px solid #DC0000' : undefined} - /> - - { - setPassword(e.target.value) - setPasswordError('') - setErrorMessage('') - }} - borderColor={passwordError ? '1px solid #DC0000' : undefined} - /> -
+ 알터 로고 + +
+
+ { + setPhone(formatPhone(e.target.value)) + setPhoneError('') + setErrorMessage('') + }} + borderColor={phoneError ? '1px solid #DC0000' : undefined} + /> + + { + setPassword(e.target.value) + setPasswordError('') + setErrorMessage('') + }} + borderColor={passwordError ? '1px solid #DC0000' : undefined} + /> +
- + + {(phoneError || passwordError || errorMessage) && ( +
+ {phoneError || passwordError || errorMessage} +
+ )} +
+ +
+
+ + 간편 로그인 + +
+
+ +
+ + + +
+ navigate('/find-password')} > - 로그인 - - - {(phoneError || passwordError || errorMessage) && ( -
- {phoneError || passwordError || errorMessage} -
- )} -
- -
-
- - 간편 로그인 + 비밀번호 찾기 + + | + + 회원가입 -
-
- -
- - - -
- navigate('/find-password')} - > - 비밀번호 찾기 - - | - - 회원가입 - -
+
) } diff --git a/src/pages/manager/home/index.tsx b/src/pages/manager/home/index.tsx index 6e772a5..0de94f5 100644 --- a/src/pages/manager/home/index.tsx +++ b/src/pages/manager/home/index.tsx @@ -89,86 +89,86 @@ const SUBSTITUTE_REQUESTS: SubstituteRequestItem[] = [ export function ManagerHomePage() { return (
- + -
- logo +
+ logo +
+
+
+
MM월 dd일
+
전체 보기
+
+
+ 오늘 근무자는 6명이에요
-
-
-
MM월 dd일
-
전체 보기
-
-
- 오늘 근무자는 6명이에요 -
-
- {TODAY_WORKERS.map(worker => ( - + {TODAY_WORKERS.map(worker => ( + + ))} +
+
+
+

+ 우리 매장 근무자 +

+ +
+
+ {STORE_WORKERS.map(worker => ( + {}} /> ))}
-
-
-

- 우리 매장 근무자 -

- -
-
- {STORE_WORKERS.map(worker => ( - {}} - /> - ))} -
-
- -
+
+
-
-

- 진행 중인 공고 10건 -

-
- {}} - onPostingClick={() => {}} - /> -
+
+
+

+ 진행 중인 공고 10건 +

+
+ {}} + onPostingClick={() => {}} + />
-
-

- 대타 승인 요청 10건 -

-
- {}} - onRequestClick={() => {}} - /> -
+
+
+

+ 대타 승인 요청 10건 +

+
+ {}} + onRequestClick={() => {}} + />
+
) } diff --git a/src/pages/user/home/index.tsx b/src/pages/user/home/index.tsx index 3ff5d49..f6b1cfb 100644 --- a/src/pages/user/home/index.tsx +++ b/src/pages/user/home/index.tsx @@ -57,38 +57,38 @@ export function UserHomePage() { return (
-
- {(['monthly', 'weekly', 'daily'] as const).map(item => ( - - ))} -
+
+ {(['monthly', 'weekly', 'daily'] as const).map(item => ( + + ))} +
- {errorMessage && ( -
- {errorMessage} -
- )} + {errorMessage && ( +
+ {errorMessage} +
+ )} - +
) } diff --git a/src/pages/user/job-lookup-map/index.tsx b/src/pages/user/job-lookup-map/index.tsx index 548146c..aaa3b02 100644 --- a/src/pages/user/job-lookup-map/index.tsx +++ b/src/pages/user/job-lookup-map/index.tsx @@ -1,16 +1,16 @@ export function JobLookupMapPage() { return (
-
-

- 알바/일자리 조회 -

-

- 아직 지도 화면은 준비 중이에요. -
- 추후 이 페이지에서 주변 알바/일자리 정보를 확인할 수 있어요. -

-
+
+

+ 알바/일자리 조회 +

+

+ 아직 지도 화면은 준비 중이에요. +
+ 추후 이 페이지에서 주변 알바/일자리 정보를 확인할 수 있어요. +

+
) } diff --git a/src/pages/user/schedule/index.tsx b/src/pages/user/schedule/index.tsx index e14b191..290bbd4 100644 --- a/src/pages/user/schedule/index.tsx +++ b/src/pages/user/schedule/index.tsx @@ -23,75 +23,75 @@ export function SchedulePage() { return (
-
-

- 내 일정 -

-
+
+

+ 내 일정 +

+
- {isLoading ? ( -
- + {isLoading ? ( +
+ +
+ ) : ( +
+ {/* 월별 네비게이션 */} +
+ +

+ {currentYear}년 {currentMonth}월 +

+
- ) : ( -
- {/* 월별 네비게이션 */} -
- -

- {currentYear}년 {currentMonth}월 -

- -
- {schedules.length > 0 ? ( -
-
- {schedules.map((schedule: ScheduleItemType) => ( - - ))} -
+ {schedules.length > 0 ? ( +
+
+ {schedules.map((schedule: ScheduleItemType) => ( + + ))}
- ) : ( -
-
- -
-

- 일정이 없습니다 -

-

- {currentYear}년 {currentMonth}월에는 -
- 등록된 일정이 없습니다. -

+
+ ) : ( +
+
+
- )} -
- )} +

+ 일정이 없습니다 +

+

+ {currentYear}년 {currentMonth}월에는 +
+ 등록된 일정이 없습니다. +

+
+ )} +
+ )}
) } diff --git a/src/pages/user/workspace-members/index.tsx b/src/pages/user/workspace-members/index.tsx index 413f8ce..0ae8398 100644 --- a/src/pages/user/workspace-members/index.tsx +++ b/src/pages/user/workspace-members/index.tsx @@ -25,68 +25,68 @@ export function WorkspaceMembersPage() { return (
-
-

- 함께 일하는 사람들 -

-
+
+

+ 함께 일하는 사람들 +

+
-
- {isWorkspaceIdInvalid && ( +
+ {isWorkspaceIdInvalid && ( +
+

+ 워크스페이스 ID가 유효하지 않습니다. 올바른 경로로 다시 + 접근해주세요. +

+
+ )} + + {!isWorkspaceIdInvalid && isLoading && ( +
+ +
+ )} + + {!isWorkspaceIdInvalid && hasError && !isLoading && ( +
+

+ 함께 일하는 사람들 목록을 불러오는 중 오류가 발생했습니다. 잠시 후 + 다시 시도해주세요. +

+
+ )} + + {!isWorkspaceIdInvalid && + !isLoading && + !hasError && + workers.length === 0 && + managers.length === 0 && (

- 워크스페이스 ID가 유효하지 않습니다. 올바른 경로로 다시 - 접근해주세요. + 현재 이 워크스페이스에 등록된 근무자 또는 점주/매니저가 + 없습니다.

)} - {!isWorkspaceIdInvalid && isLoading && ( -
- + {!isWorkspaceIdInvalid && + !isLoading && + !hasError && + (workers.length > 0 || managers.length > 0) && ( +
+ +
)} - - {!isWorkspaceIdInvalid && hasError && !isLoading && ( -
-

- 함께 일하는 사람들 목록을 불러오는 중 오류가 발생했습니다. 잠시 - 후 다시 시도해주세요. -

-
- )} - - {!isWorkspaceIdInvalid && - !isLoading && - !hasError && - workers.length === 0 && - managers.length === 0 && ( -
-

- 현재 이 워크스페이스에 등록된 근무자 또는 점주/매니저가 - 없습니다. -

-
- )} - - {!isWorkspaceIdInvalid && - !isLoading && - !hasError && - (workers.length > 0 || managers.length > 0) && ( -
- - -
- )} -
+
) } diff --git a/src/shared/ui/MobileLayout.tsx b/src/shared/ui/MobileLayout.tsx index b475bab..eb62680 100644 --- a/src/shared/ui/MobileLayout.tsx +++ b/src/shared/ui/MobileLayout.tsx @@ -12,7 +12,7 @@ export function MobileLayout({ maxWidth = '428px', }: MobileLayoutProps) { return ( -
+
+
From 68539780a0f50dcadfa9eedcc8d1c97d48f15fd6 Mon Sep 17 00:00:00 2001 From: Dohyeon Date: Sat, 28 Mar 2026 00:06:14 +0900 Subject: [PATCH 3/3] =?UTF-8?q?chore:=20app=20basename=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 3 +++ src/app/App.tsx | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69ccc53..d2d1c96 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,9 @@ on: push: branches: [dev, main] +permissions: + contents: read + concurrency: group: ci-${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true diff --git a/src/app/App.tsx b/src/app/App.tsx index 66bcd6d..2bc0174 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -31,7 +31,11 @@ function MobileRouteLayoutWithDocbar() { ) } -const routerBasename = import.meta.env.BASE_URL.replace(/\/$/, '') || undefined +const basePath = import.meta.env.BASE_URL.replace(/\/$/, '') +const routerBasename = + basePath && basePath.startsWith('/') && basePath !== '/' + ? basePath + : undefined export function App() { return (