Skip to content

node-server: treat an empty X-Forwarded-* header as absent #2

node-server: treat an empty X-Forwarded-* header as absent

node-server: treat an empty X-Forwarded-* header as absent #2

Workflow file for this run

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