turbo.json update #59
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 Convex | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| workflow_dispatch: | |
| jobs: | |
| deploy-prod: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| concurrency: | |
| group: convex-${{ github.ref }} | |
| cancel-in-progress: true | |
| environment: production | |
| env: | |
| FIRECRAWL_API_KEY: ${{ secrets.FIRECRAWL_API_KEY }} | |
| CONVEX_DEPLOY_KEY: ${{ secrets.CONVEX_DEPLOY_KEY }} | |
| CONVEX_DEPLOYMENT: ${{ secrets.CONVEX_DEPLOYMENT }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.2.23 | |
| - name: Cache bun and node_modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.bun/install/cache | |
| **/node_modules | |
| key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-bun- | |
| - run: bun install --frozen-lockfile | |
| - name: Deploy Convex (prod) | |
| run: | | |
| cd packages/server | |
| bun run deploy | |
| deploy-preview: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event_name == 'pull_request' && vars.ENABLE_CONVEX_PREVIEWS == '1' }} | |
| concurrency: | |
| group: convex-preview-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| environment: preview | |
| permissions: | |
| contents: read | |
| env: | |
| FIRECRAWL_API_KEY: ${{ secrets.FIRECRAWL_API_KEY }} | |
| CONVEX_DEPLOY_KEY: ${{ secrets.CONVEX_DEPLOY_KEY }} | |
| CONVEX_DEPLOYMENT: ${{ secrets.CONVEX_DEPLOYMENT }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.2.23 | |
| - name: Cache bun and node_modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.bun/install/cache | |
| **/node_modules | |
| key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-bun- | |
| - run: bun install --frozen-lockfile | |
| - name: Deploy Convex (preview) | |
| run: | | |
| cd packages/server | |
| bun run deploy |