- HttpOnly 쿠키 refresh token (localStorage 제거) - 런치 티켓 방식 (JWT URL 노출 방지) - JWT 디코드로 role 결정 (localStorage 신뢰 제거) - apiUpload withCredentials 추가 - ErrorBoundary 컴포넌트 추가 - 404 catch-all 라우트 추가 - ARIA 접근성 (tab pattern, aria-label, aria-live) - Toast CSS 추출 + toastId useRef - UploadForm 별도 파일 분리 + apiUpload 함수 - UserAdmin fetchError 상태 + retry 버튼 - AuthRedirect 일관성 (모든 경로 → /login) - DownloadSection localStorage 중복 제거 - CI lint + test + build 검증 단계 추가 - Vitest 테스트 (client 8, Register 10, Login 8) - AuthPage.css 공유 의도 명확화 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
name: Client CI/CD
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: 코드 체크아웃
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Node.js 설정
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
cache: 'npm'
|
|
|
|
- name: 의존성 설치
|
|
run: npm ci
|
|
|
|
- name: 린트 검사
|
|
run: npm run lint
|
|
|
|
- name: 테스트 실행
|
|
run: npm test
|
|
|
|
- name: 프로덕션 빌드 검증
|
|
run: npm run build
|
|
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
needs: test
|
|
steps:
|
|
- name: 서버에 배포
|
|
uses: appleboy/ssh-action@v1
|
|
with:
|
|
host: ${{ secrets.SERVER_HOST }}
|
|
username: ${{ secrets.SERVER_USER }}
|
|
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
port: 22
|
|
script: |
|
|
set -e
|
|
export PATH=$PATH:/usr/local/bin:/opt/homebrew/bin:$HOME/.docker/bin
|
|
cd /tmp
|
|
rm -rf a301-client
|
|
git clone https://tolelom:${{ secrets.GIT_TOKEN }}@git.tolelom.xyz/A301/a301_client.git a301-client
|
|
cd a301-client
|
|
docker build --no-cache --build-arg VITE_API_BASE_URL=${{ secrets.VITE_API_BASE_URL }} -t a301-client:latest .
|
|
cd ~/server
|
|
docker compose up -d --force-recreate a301-client
|
|
rm -rf /tmp/a301-client
|