Repository navigation
node-server: treat an empty X-Forwarded-* header as absent #2
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 | |
| # The real execution path behind the "Deploy to Cloudflare" button. The button | |
| # creates the repo and the bindings it can; this workflow creates the ones it | |
| # cannot (queues, datasets) and only then deploys — so the first deploy produces | |
| # a working system rather than a Worker that fails on its first send. | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: deploy-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.11.0 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - name: Typecheck and test | |
| run: | | |
| pnpm typecheck | |
| pnpm test | |
| - name: Provision the resources the button does not create | |
| env: | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| run: pnpm exec tsx scripts/provision.ts | |
| - name: Build | |
| run: pnpm --filter @mailysend/app build:cf | |
| - name: Apply database migrations | |
| env: | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| run: pnpm exec wrangler d1 migrations apply mailysend --remote --config apps/app/wrangler.jsonc | |
| - name: Deploy | |
| env: | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| run: pnpm exec wrangler deploy --config apps/app/wrangler.jsonc |