Bump minimatch #34
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: Deploy to Vercel | |
| on: | |
| workflow_run: | |
| workflows: ["Generate OSRS Tiles"] | |
| types: | |
| - completed | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - 'public/tiles/**' # Don't deploy on tile updates alone | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| # Only run if tile generation succeeded | |
| if: | | |
| github.event_name == 'push' || | |
| github.event_name == 'pull_request' || | |
| (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| # Fetch latest changes including tiles | |
| ref: ${{ github.event_name == 'workflow_run' && 'main' || github.ref }} | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build Next.js application | |
| run: npm run build | |
| env: | |
| NODE_OPTIONS: '--max-old-space-size=4096' | |
| # Option 1: Use Vercel CLI for deployment (more reliable) | |
| - name: Install Vercel CLI | |
| run: npm i -g vercel@latest | |
| if: env.VERCEL_TOKEN != '' | |
| env: | |
| VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
| - name: Create lightweight deployment | |
| run: | | |
| echo "⚠️ Tiles are 864MB - too large for Vercel deployment" | |
| echo "🔄 Creating deployment without tiles (API will redirect to GitHub)" | |
| mkdir -p public/tiles-placeholder | |
| echo "Tiles served from GitHub repository" > public/tiles-placeholder/README.txt | |
| rm -rf public/tiles | |
| - name: Deploy to Vercel (Production) | |
| run: | | |
| echo "🚀 Deploying lightweight version..." | |
| vercel --prod --token ${{ secrets.VERCEL_TOKEN }} | |
| if: github.ref == 'refs/heads/main' && env.VERCEL_TOKEN != '' | |
| env: | |
| VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
| VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
| - name: Deploy to Vercel (Preview) | |
| run: vercel --token ${{ secrets.VERCEL_TOKEN }} | |
| if: github.ref != 'refs/heads/main' && env.VERCEL_TOKEN != '' | |
| env: | |
| VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
| VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
| # Option 2: Simple notification (if secrets not configured) | |
| - name: Deployment Ready Notification | |
| run: | | |
| echo "🎯 Application is ready for deployment!" | |
| echo "📦 Build completed successfully" | |
| echo "🗺️ Tiles are up to date" | |
| echo "" | |
| echo "To deploy manually:" | |
| echo " vercel --prod" | |
| echo "" | |
| echo "Or configure Vercel secrets for automatic deployment:" | |
| echo " VERCEL_TOKEN, VERCEL_ORG_ID, VERCEL_PROJECT_ID" | |
| if: env.VERCEL_TOKEN == '' | |
| env: | |
| VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} |