[ImgBot] Optimize images #19
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 - Platform | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'apps/platform/**' # Only trigger if changes in this directory | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - 'apps/platform/**' # Only trigger if changes in this directory | |
| workflow_dispatch: | |
| env: | |
| VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PLATFORM_PROJECT_ID }} | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| # Set default working directory for all steps | |
| defaults: | |
| run: | |
| working-directory: apps/platform | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Run linter (optional) | |
| run: bun run lint | |
| continue-on-error: true | |
| - name: Run tests (optional) | |
| run: bun test | |
| continue-on-error: true | |
| - name: Install Vercel CLI | |
| run: bun install --global vercel@latest | |
| working-directory: . | |
| - name: Deploy to Vercel (Production) | |
| if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') | |
| run: | | |
| vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
| vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | |
| vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} | |
| - name: Deploy to Vercel (Preview) | |
| if: github.event_name == 'pull_request' && github.ref == 'refs/heads/main' | |
| run: | | |
| vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | |
| vercel build --token=${{ secrets.VERCEL_TOKEN }} | |
| vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} |