ci: limit vercel deploy to apps changes only #110
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 Vercel | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "apps/mcp-cafe24-admin-example/**" | |
| - ".github/workflows/deploy-vercel.yml" | |
| concurrency: | |
| group: vercel-cafe24-admin-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| env: | |
| APP_DIR: apps/mcp-cafe24-admin-example | |
| VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_CAFE24_ADMIN_EXAMPLE }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| - name: Install dependencies (workspace) | |
| run: bun install --frozen-lockfile | |
| - name: Debug Vercel Project | |
| run: | | |
| echo "VERCEL_PROJECT_ID=${VERCEL_PROJECT_ID:0:8}****" | |
| echo "VERCEL_ORG_ID=${VERCEL_ORG_ID:0:8}****" | |
| - name: Vercel Pull | |
| run: | | |
| npx vercel pull --yes \ | |
| --environment=${{ github.ref_name == 'main' && 'production' || 'preview' }} \ | |
| --token=${{ secrets.VERCEL_TOKEN }} | |
| - name: Vercel Build | |
| run: | | |
| npx vercel build \ | |
| ${{ github.ref_name == 'main' && '--prod' || '' }} \ | |
| --token=${{ secrets.VERCEL_TOKEN }} | |
| - name: Vercel Deploy | |
| run: | | |
| npx vercel deploy --prebuilt \ | |
| ${{ github.ref_name == 'main' && '--prod' || '' }} \ | |
| --token=${{ secrets.VERCEL_TOKEN }} |