Files
SubsTracker/.github/workflows/deploy.yml
wangwangit d3066dfc5e docs+ci: README/MIGRATION/ARCHITECTURE 文档 + GitHub Actions(Task 13)
文档:
- README.md 整体重写(v3 关键改进、部署、升级、FAQ)
- docs/MIGRATION.md v2 → v3 详细迁移指南,含回滚 3 种方案与升级检查清单
- docs/ARCHITECTURE.md 完整架构图、目录结构、KV Key 布局、
  调度器流程、提醒规则模型、9 渠道适配器、关键测试索引、
  常见维护场景指南

CI:
- .github/workflows/test.yml:push/PR 触发 lint + 170 单测
- .github/workflows/deploy.yml:main 分支自动部署,需配置 secrets
  CLOUDFLARE_API_TOKEN

package.json version: 3.0.0-alpha.1 → 3.0.0

170 测试全绿;wrangler dry-run 560 KiB / gzip 118 KiB。

Refs Task 13 of refactor/v3-product-grade plan.
2026-05-24 18:34:42 +08:00

37 lines
952 B
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Deploy
on:
push:
branches: [main, master]
workflow_dispatch: # 允许手动触发
jobs:
deploy:
name: Deploy to Cloudflare Workers
runs-on: ubuntu-latest
# 需要在 GitHub 仓库 Settings → Secrets 配置:
# CLOUDFLARE_API_TOKEN (Workers 编辑 + KV 编辑权限)
# CLOUDFLARE_ACCOUNT_ID (可选Token 可锁定到单 account)
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Lint + Test (deploy 前最后一道防线)
run: |
npm run lint
npm test
- name: Deploy to Cloudflare Workers
run: npm run deploy:safe
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}