fix: remove reference to non-existent scope column in auth query #23
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 Worker | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'worker/**' | |
| - '.github/workflows/deploy-worker.yml' | |
| workflow_dispatch: | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| name: Deploy mails-worker | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: cd worker && bun install | |
| - name: Inject D1 database ID | |
| env: | |
| D1_ID: ${{ secrets.D1_DATABASE_ID }} | |
| run: sed -i "s/YOUR_D1_DATABASE_ID/${D1_ID}/" worker/wrangler.toml | |
| - name: Ensure Vectorize index exists | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| run: | | |
| cd worker | |
| npx wrangler vectorize create mails-embeddings --dimensions 768 --metric cosine 2>&1 || echo "Vectorize index already exists or creation skipped" | |
| - name: Deploy to Cloudflare Workers | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| workingDirectory: worker |