Fix: beforeErrorHook에 전역 상태 초기화 및 TanStack Query 캐시 무효화 로직 추가 #407
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Preview Deployment | |
| on: | |
| push: | |
| branches: ["develop", "main"] | |
| pull_request: | |
| branches: ["develop", "main"] | |
| permissions: | |
| contents: read | |
| pages: write | |
| deployments: write | |
| id-token: write | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| vercel-preview: | |
| runs-on: ubuntu-latest | |
| env: | |
| VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install pnpm | |
| run: | | |
| npm install -g pnpm | |
| pnpm --version | |
| - name: Install Vercel CLI | |
| run: npm install -g vercel@latest | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run linting and type checking | |
| run: | | |
| pnpm lint | |
| pnpm type-check | |
| - name: Pull Vercel Environment Variables | |
| run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | |
| - name: Build Project Artifacts | |
| run: vercel build --token=${{ secrets.VERCEL_TOKEN }} | |
| - name: Deploy to Vercel | |
| id: deploy | |
| run: | | |
| echo "🚀 Starting preview deployment..." | |
| vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} > vercel-output.txt | |
| # Check if deployment was successful | |
| if [ -f vercel-output.txt ] && [ -s vercel-output.txt ]; then | |
| preview_url=$(cat vercel-output.txt) | |
| echo "preview_url=$preview_url" >> $GITHUB_OUTPUT | |
| echo "✅ Preview deployment successful: $preview_url" | |
| else | |
| echo "❌ Error: Preview deployment failed or output file is empty" | |
| exit 1 | |
| fi | |
| - name: Comment on PR with Preview URL | |
| if: github.event_name == 'pull_request' && steps.deploy.outcome == 'success' | |
| uses: thollander/actions-comment-pull-request@v2 | |
| with: | |
| message: | | |
| ## ✅ Preview Deployment Ready! | |
| 🔗 **Preview URL**: ${{ steps.deploy.outputs.preview_url }} | |
| 📝 **Branch**: `${{ github.head_ref || github.ref_name }}` | |
| 💾 **Commit**: ${{ github.event.head_commit.message || github.event.pull_request.title }} | |
| 🕐 **Deployed at**: ${{ github.event.head_commit.timestamp }} | |
| --- | |
| *This preview will be automatically updated on new commits.* | |
| - name: Output deployment result | |
| if: always() | |
| run: | | |
| echo "## 🎉 Preview Deployment Summary" | |
| echo "**Event**: ${{ github.event_name }}" | |
| echo "**Branch**: ${{ github.head_ref || github.ref_name }}" | |
| echo "**Commit**: ${{ github.sha }}" | |
| if [ "${{ steps.deploy.outcome }}" == "success" ]; then | |
| echo "**Status**: ✅ Success" | |
| echo "**Preview URL**: ${{ steps.deploy.outputs.preview_url }}" | |
| else | |
| echo "**Status**: ❌ Failed - Please check the logs above." | |
| fi |