Files
AuthInbox/.github/workflows/main.yml
T
TooonyChen 4835e758a4 feat: add React frontend, migrate to pnpm, and harden email processing
- Replace server-rendered HTML with React 18 + Vite + shadcn/ui dashboard
    (mail list, detail panel, Extracted/Raw/Rendered tabs, sonner toasts)
  - Add REST API endpoints: GET /api/mails, GET /api/mails/:id
  - Fix MIME base64 body extraction (rewrite extractMailBodies with proper
    multipart boundary parsing and atob decoding)
  - Add isPromotionalEmail() pre-LLM filter (List-Unsubscribe, List-ID,
    Precedence: bulk, ESP X-headers) to avoid wasting AI tokens on ads
  - Fix codeAndLink() to use regex URL extraction instead of comma-split,
    preventing layout break on URLs containing commas
  - Add ASSETS binding to wrangler.toml.example for static frontend serving
- Migrate from npm to pnpm; add pnpm-workspace.yaml
  - Add CLAUDE.md and update AGENTS.md with current architecture
2026-03-15 03:11:08 +13:00

48 lines
1.2 KiB
YAML

name: Deploy Auth Inbox to Cloudflare Workers
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
name: Deploy Auth Inbox Worker
steps:
# 步骤 1: 检出代码
- name: Checkout Repository
uses: actions/checkout@v4
# 步骤 2: 设置 Node.js 环境
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20' # 根据您的项目需求选择 Node.js 版本
# 步骤 3: 安装依赖项
- name: Install Dependencies
run: npm install
- name: Install Web Dependencies
run: npm --prefix web install
- name: Build Web App
run: npm run build:web
# 步骤 4: 部署 Worker
- name: Deploy Backend for ${{ github.ref_name }}
run: |
# Write secrets.TOML to wrangler.toml file
echo '${{ secrets.TOML }}' > wrangler.toml
# Deploy the worker using Wrangler
npx wrangler deploy
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}