- AddTransactionButton.tsx: useEffect import 제거 - BudgetProgressCard.tsx: localBudgetData를 _localBudgetData로 변경 - Header.tsx: isMobile을 _isMobile로 변경 - RecentTransactionsSection.tsx: isDeleting을 _isDeleting로 변경 - TransactionCard.tsx: cn import 제거 - ExpenseForm.tsx: useState import 제거 - cacheStrategies.ts: QueryClient, Transaction import 제거 - Analytics.tsx: Separator import 제거, 미사용 변수들에 underscore prefix 추가 - Index.tsx: useMemo import 제거 - Login.tsx: setLoginError를 _setLoginError로 변경 - Register.tsx: useEffect dependency 수정 및 useCallback 추가 - Settings.tsx: toast, handleClick에 underscore prefix 추가 - authStore.ts: setError, setAppwriteInitialized에 underscore prefix 추가 - budgetStore.ts: ranges를 _ranges로 변경 - BudgetProgressCard.test.tsx: waitFor import 제거 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
92 lines
2.6 KiB
YAML
92 lines
2.6 KiB
YAML
name: Vercel Deployment Workflow
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build-and-test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '18'
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Run type check
|
|
run: npm run type-check
|
|
|
|
- name: Run tests
|
|
run: npm run test:run
|
|
|
|
- name: Build project
|
|
run: npm run build
|
|
env:
|
|
VITE_APPWRITE_ENDPOINT: ${{ secrets.VITE_APPWRITE_ENDPOINT }}
|
|
VITE_APPWRITE_PROJECT_ID: ${{ secrets.VITE_APPWRITE_PROJECT_ID }}
|
|
VITE_APPWRITE_DATABASE_ID: ${{ secrets.VITE_APPWRITE_DATABASE_ID }}
|
|
VITE_APPWRITE_TRANSACTIONS_COLLECTION_ID: ${{ secrets.VITE_APPWRITE_TRANSACTIONS_COLLECTION_ID }}
|
|
VITE_DISABLE_LOVABLE_BANNER: true
|
|
|
|
- name: Upload build artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: build-files
|
|
path: dist/
|
|
retention-days: 7
|
|
|
|
deployment-notification:
|
|
runs-on: ubuntu-latest
|
|
needs: build-and-test
|
|
if: always()
|
|
|
|
steps:
|
|
- name: Deployment Success Notification
|
|
if: needs.build-and-test.result == 'success'
|
|
run: |
|
|
echo "✅ 빌드가 성공적으로 완료되었습니다!"
|
|
echo "Vercel이 자동으로 배포를 진행합니다."
|
|
|
|
- name: Deployment Failure Notification
|
|
if: needs.build-and-test.result == 'failure'
|
|
run: |
|
|
echo "❌ 빌드가 실패했습니다!"
|
|
echo "배포가 중단되었습니다. 로그를 확인해주세요."
|
|
|
|
security-check:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '18'
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Run security audit
|
|
run: npm audit --audit-level=moderate
|
|
continue-on-error: true
|
|
|
|
- name: Check for vulnerabilities
|
|
run: |
|
|
if npm audit --audit-level=high --dry-run; then
|
|
echo "✅ 심각한 보안 취약점이 발견되지 않았습니다."
|
|
else
|
|
echo "⚠️ 보안 취약점이 발견되었습니다. 검토가 필요합니다."
|
|
fi |