#!/bin/sh
set -eu

export SVELTE_ADAPTER="${SVELTE_ADAPTER:-cloudflare}"
export VITE_OAUTH_CLIENT_ID="${VITE_OAUTH_CLIENT_ID:-https://next.tangled.org/oauth-client-metadata.json}"
export VITE_OAUTH_REDIRECT_URI="${VITE_OAUTH_REDIRECT_URI:-https://next.tangled.org/oauth/callback}"

pnpm run build
exec pnpm exec wrangler deploy --config wrangler.dev.jsonc
