Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

docs: trim Cloudflare deployment guidance

tianma-if29f30e104708
diff --git a/docs/cloudflare-workers-builds.md b/docs/cloudflare-workers-builds.md
index f19b6edf..f356bf32 100644
--- a/docs/cloudflare-workers-builds.md
+++ b/docs/cloudflare-workers-builds.md
@@ -2,7 +2,7 @@
## Setup
-For a manual repository import, keep Cloudflare's default `npx wrangler deploy` command as described in the [online deployment guide](deploy-cloudflare-button.md), with root directory `/` and production branch `main`. The repository-provided Wrangler compatibility entrypoint routes that default command through the complete EdgeEver deployment pipeline. Existing projects using the explicit build and `bun run deploy:cloudflare-builds` commands remain supported.
+For a manual import, follow the [online deployment guide](deploy-cloudflare-button.md), use the repository root and `main` branch, and keep the default `npx wrangler deploy` command. Existing projects can keep their explicit build and `bun run deploy:cloudflare-builds` commands.
Authorization:
@@ -10,11 +10,11 @@ Authorization:
2. If the Agent integration needs a Cloudflare API token, use a User API Token limited to the target account.
3. Configure the deployment API token in Cloudflare under **Worker -> Settings -> Build -> API token**. The automatically generated token may lack D1 permissions; confirm it has D1 read and edit permissions for the target account before deploying.
-Configure `EDGE_EVER_AUTH_PASSWORD` under the Worker's **Settings -> Variables and Secrets** as a runtime Secret; do not copy the password into Builds variables. `deploy:cloudflare-builds` reuses that Secret and verifies its presence after deployment.
+Set `EDGE_EVER_AUTH_PASSWORD` as a runtime Secret under the Worker's **Settings → Variables and Secrets**, not as a Builds variable.
-Keep the tracked `wrangler.toml` unchanged. Ordinary deployments use D1 `edgeever`, R2 `edgeever-resources`, and username `admin`. Optional non-secret instance settings such as `EDGE_EVER_AUTH_USERNAME`, `EDGE_EVER_WORKER_NAME`, `EDGE_EVER_D1_DATABASE_NAME`, `EDGE_EVER_R2_BUCKET_NAME`, and custom routing belong under **Settings -> Build -> Build variables and secrets**. Workers Builds variables are available to the build command, not to the running Worker; the deploy command uses them to generate a temporary Wrangler configuration. Passwords and credentials remain runtime Secrets.
+Ordinary deployments use D1 `edgeever`, R2 `edgeever-resources`, and username `admin`. Put optional non-secret instance settings under **Settings → Build → Build variables and secrets**. These variables are available only during the build; the deploy command uses them to generate a temporary Wrangler configuration. Keep the tracked `wrangler.toml` unchanged.
-Backward compatibility is automatic: without explicit R2 or username Builds variables, an upgrade inspects the active production Worker versions and preserves their existing `RESOURCES` bucket and administrator username. A brand-new Worker uses the standard defaults.
+Without an explicit override, existing deployments keep their current R2 bucket and administrator username.
## Updates and troubleshooting
@@ -24,12 +24,11 @@ Backward compatibility is automatic: without explicit R2 or username Builds vari
- Set the GitHub Repository Variable `EDGE_EVER_UPDATE_CHANNEL=edge` to follow upstream `main`.
- Read-only forks (no app code changes) apply the target's product snapshot in a new linear commit without installing dependencies or running the project test suite.
- Only forks that explicitly set `EDGE_EVER_PRESERVE_FORK_CHANGES=true` merge product changes. A customized merge runs local migrations, the complete non-E2E test suite, type checks, and the production build before pushing; any failure leaves `main` and production unchanged.
- - Formal Releases run the same complete non-E2E suite on an official Ubuntu job before Draft assets are prepared. This keeps the stable channel's upstream baseline green, so customized-fork failures indicate an integration problem rather than a test already broken by the Release itself.
- - The complete downstream `.github/workflows/**` directory and two updater helper scripts form a stable local bootstrap layer. Official packaging, signing, testing, and Release workflows are not part of automatic product updates, so `GITHUB_TOKEN` never needs permission to rewrite Actions workflows.
- - Every run writes a bilingual job **Summary** that separates the Fork's Git state, the deployment trigger, and live-deployment verification. A green scheduled run that says *Already on upstream target* means no deployment was requested; a successful push means deployment was requested but still must be confirmed in Cloudflare.
+ - Updates preserve the Fork's `.github/workflows/**` and updater helper scripts; `GITHUB_TOKEN` needs no permission to rewrite Actions workflows.
+ - The job **Summary** shows Git and deployment status. *Already on upstream target* means a scheduled run requested no deployment; a successful push still needs confirmation in Cloudflare.
- Prefer this workflow over GitHub **Sync fork**. Sync fork follows upstream `main` history and can make the next stable run a deliberate no-op.
- Optional: repository secret `EDGE_EVER_CLOUDFLARE_DEPLOY_HOOK_URL` triggers a Cloudflare Deploy Hook after a successful push (useful when the Git integration misses a push).
-- Manually running the workflow redeploys the selected version even when Git is already current: it pushes an empty commit so Cloudflare receives a fresh build event. Scheduled checks remain no-op when already aligned.
+- Manually running the workflow triggers a new Cloudflare build even when Git is current.
- Build failure: inspect the Worker **Deployments** log and confirm the Deployment commit SHA matches Fork `main`.
- Scheduled update never runs: on a public Fork, enable **Update deployed EdgeEver** under **Actions** (scheduled workflows are disabled by default on forks, and may pause after long inactivity).
- Update push is rejected with `without workflows permission`: the Fork still has an older updater. Use GitHub **Sync fork** once with the repository owner's permission, then re-run **Update deployed EdgeEver**. Routine product updates do not require **Sync fork** after that bootstrap.
diff --git a/docs/cloudflare-workers-builds.zh-CN.md b/docs/cloudflare-workers-builds.zh-CN.md
index 4229f615..038493d6 100644
--- a/docs/cloudflare-workers-builds.zh-CN.md
+++ b/docs/cloudflare-workers-builds.zh-CN.md
@@ -2,7 +2,7 @@
## 配置
-手动导入仓库时,按[在线部署文档](deploy-cloudflare-button.zh-CN.md)保留 Cloudflare 默认的 `npx wrangler deploy` 命令,仓库根目录为 `/`,生产分支为 `main`。仓库提供的 Wrangler 兼容入口会把该默认命令接入 EdgeEver 的完整部署流水线。已有项目继续使用显式构建命令与 `bun run deploy:cloudflare-builds` 也受支持。
+手动导入仓库时,按[在线部署文档](deploy-cloudflare-button.zh-CN.md)选择仓库根目录和 `main` 分支,保留默认部署命令 `npx wrangler deploy`。已有项目可继续使用原来的显式构建命令和 `bun run deploy:cloudflare-builds`。
授权:
@@ -10,11 +10,11 @@
2. 如果 Agent 集成需要 Cloudflare API Token,使用限制到目标账号的 User API Token。
3. 部署 API Token 在 Cloudflare **Worker -> Settings -> Build -> API token** 中配置。默认自动生成的 token 可能没有 D1 权限;部署前应确认其具备目标账户的 D1 读取与编辑权限。
-`EDGE_EVER_AUTH_PASSWORD` 应配置在 Worker 的 **Settings -> Variables and Secrets** 中,作为运行时 Secret;不要把密码复制到 Builds 的构建变量。`deploy:cloudflare-builds` 会复用该 Secret,并在部署后验证它是否存在。
+在 Worker 的 **Settings → Variables and Secrets** 中设置运行时 Secret `EDGE_EVER_AUTH_PASSWORD`,不要放入 Builds 构建变量。
-受版本控制的 `wrangler.toml` 必须保持不变。普通部署使用 D1 `edgeever`、R2 `edgeever-resources` 和用户名 `admin`。`EDGE_EVER_AUTH_USERNAME`、`EDGE_EVER_WORKER_NAME`、`EDGE_EVER_D1_DATABASE_NAME`、`EDGE_EVER_R2_BUCKET_NAME` 与自定义路由等可选非敏感实例参数,应放在 **Settings -> Build -> Build variables and secrets**。Workers Builds 变量只对构建命令可见,不会直接成为 Worker 运行时变量;部署命令会用它们生成临时 Wrangler 配置。密码及其他凭据始终属于运行时 Secret。
+普通部署使用 D1 `edgeever`、R2 `edgeever-resources` 和用户名 `admin`。可选的非敏感实例参数放在 **Settings → Build → Build variables and secrets**;这些变量仅供构建使用,部署命令会据此生成临时 Wrangler 配置。不要修改仓库中的 `wrangler.toml`。
-旧版兼容会自动完成:未显式设置 R2 或用户名 Builds 变量时,升级会检查正在承载生产流量的 Worker 版本,并保留其已有的 `RESOURCES` 存储桶和管理员用户名;全新 Worker 才使用标准默认值。
+未显式覆盖时,旧部署会保留当前的 R2 存储桶和管理员用户名。
## 更新与排错
@@ -24,12 +24,11 @@
- 设置 GitHub Repository Variable `EDGE_EVER_UPDATE_CHANNEL=edge` 后跟随上游 `main`。
- 只读 Fork(未改应用代码)会用一个新的线性提交应用目标版本的产品代码快照,不安装依赖,也不执行项目测试套件。
- 只有显式设置 `EDGE_EVER_PRESERVE_FORK_CHANGES=true` 的 Fork 才会合并产品代码。定制合并会在 push 前执行本地 migration、完整非 E2E 测试、类型检查和生产构建;任一步失败都会保持 `main` 与线上版本不变。
- - 正式 Release 会在准备 Draft 资产前,由官方 Ubuntu Job 执行同一套完整非 E2E 测试,确保 stable 通道的上游基线本身为绿色;定制 Fork 若失败,应代表合并集成问题,而不是 Release 自带的测试已经失败。
- - 下游完整的 `.github/workflows/**` 目录和两个更新辅助脚本会作为稳定的本地引导层原样保留。官方打包、签名、测试与 Release 工作流不参与产品代码自动更新,因此 `GITHUB_TOKEN` 无需取得改写 Actions 工作流的权限。
- - 每次运行都会写中英双语 Job **Summary**,分别展示 Fork 的 Git 状态、部署触发状态和线上验证状态。若定时运行绿色成功并写明 *Already on upstream target* / 已对齐,表示本次未请求部署;push 成功只表示已请求部署,仍需在 Cloudflare 中确认。
+ - 更新会保留 Fork 中的 `.github/workflows/**` 和更新辅助脚本,无需授予 `GITHUB_TOKEN` 改写工作流的权限。
+ - Job **Summary** 会显示 Git 和部署状态。*Already on upstream target* / 已对齐表示定时运行未请求部署;push 成功后仍需在 Cloudflare 中确认部署。
- 请优先用本工作流,而不是 GitHub **Sync fork**。Sync fork 跟的是上游 `main` 历史,可能让下一次 stable 运行合理变为 no-op。
- 可选:仓库 Secret `EDGE_EVER_CLOUDFLARE_DEPLOY_HOOK_URL`,在成功 push 后触发 Cloudflare Deploy Hook(Git 集成偶发未构建时有用)。
-- 手动运行工作流时,即使 Git 已是最新,也会推送空 commit 重新触发 Cloudflare 构建;定时检查在已对齐时仍保持 no-op。
+- 手动运行工作流会重新触发 Cloudflare 构建,即使 Git 已是最新。
- 构建失败:查看 Worker **Deployments** 日志,确认部署 commit SHA 与 Fork `main` 一致。
- 定时任务从不运行:公共 Fork 需在 **Actions** 中启用 **Update deployed EdgeEver**(Fork 上 schedule 默认禁用,长期不活跃也可能被暂停)。
- 更新 push 被 `without workflows permission` 拒绝:说明 Fork 仍在使用旧版更新器。请用仓库所有者权限执行一次 GitHub **Sync fork**,再重新运行 **Update deployed EdgeEver**;完成这次引导后,日常产品更新不再需要 **Sync fork**。
diff --git a/docs/deploy-cloudflare-button.md b/docs/deploy-cloudflare-button.md
index 5a2910c5..700d0a92 100644
--- a/docs/deploy-cloudflare-button.md
+++ b/docs/deploy-cloudflare-button.md
@@ -1,8 +1,6 @@
# EdgeEver Manual Online Deployment Guide
-This document provides a detailed step-by-step guide for deploying EdgeEver online via GitHub and Cloudflare. The entire setup is performed in your browser—**no local code installation or environment setup is required**.
-
-> 💡 **Zero-Cost Self-Hosting**: Built completely on Cloudflare's free tiers—**no VPS or server rentals needed, and no Docker or SSL certificate setup required**.
+Deploy EdgeEver through GitHub and Cloudflare in your browser, without installing code locally or configuring a server.
---
@@ -13,7 +11,7 @@ This document provides a detailed step-by-step guide for deploying EdgeEver onli
---
-## Step-by-Step Deployment Guide
+## First Deployment
### Step 1: Fork the Repository
@@ -24,7 +22,7 @@ This document provides a detailed step-by-step guide for deploying EdgeEver onli
### Step 2: Create Storage & Database Resources in Cloudflare
-Log into your [Cloudflare Dashboard](https://dash.cloudflare.com/). Cloudflare may reorganize its sidebar; use the official [D1 getting started guide](https://developers.cloudflare.com/d1/get-started/) and [R2 getting started guide](https://developers.cloudflare.com/r2/get-started/) if an entry has moved:
+Log into your [Cloudflare Dashboard](https://dash.cloudflare.com/). If an entry moves, see the official [D1](https://developers.cloudflare.com/d1/get-started/) and [R2](https://developers.cloudflare.com/r2/get-started/) guides:
1. **Create a D1 Database**:
- Under **Storage & databases**, open **D1 SQL Database** and click **Create database**.
@@ -37,58 +35,33 @@ Log into your [Cloudflare Dashboard](https://dash.cloudflare.com/). Cloudflare m
### Step 3: Import the Project
-1. In the Cloudflare Dashboard, open **Workers & Pages**, click **Create application**, then click **Get started** next to **Import a repository**. This creates a Worker connected to your Git repository; see [Cloudflare's Workers Builds instructions](https://developers.cloudflare.com/workers/ci-cd/builds/#connect-a-new-worker) if the entry moves.
+1. Open **Workers & Pages**, click **Create application**, then **Get started** next to **Import a repository**. If the entry moves, see [Cloudflare's instructions](https://developers.cloudflare.com/workers/ci-cd/builds/#connect-a-new-worker).
2. Follow the prompts to connect your GitHub account, authorize access to your Fork, and select the Forked `edgeever` repository.
3. Project settings:
- **Git branch** (or **Production branch**): `main`
- **Root directory**: Leave blank to use the repository root
- - **Deploy command**: Keep the default `npx wrangler deploy`
+ - Deploy command: npx wrangler deploy (keep the default)
- **API token**: The automatically generated token may lack D1 permissions. Select or create a User API Token scoped to the target account with D1 read and edit permissions; if permissions are insufficient, correct them based on the build log and retry.
-The repository's deployment command creates the `DB` and `RESOURCES` bindings from the standard resource names. Do not edit `wrangler.toml` or add duplicate bindings in the Dashboard.
-
-Existing deployments created from older instructions do not need to rename or migrate a custom R2 bucket. When no explicit Builds variable is set, the deploy command reads the live Worker's current `RESOURCES` binding and keeps using that bucket automatically.
+The deployment command creates the `DB` and `RESOURCES` bindings and looks up the D1 UUID. Do not edit `wrangler.toml` or add duplicate bindings in the Dashboard.
---
### Step 4: Create the Project and Set the Administrator Password
-Click **Save and Deploy** to create the Worker project. On a new deployment, the first build fails its post-deployment verification because the authentication Secret has not been configured yet. Do not use the generated site URL at this point. In the new Worker's **Settings** -> **Variables and Secrets**, click **Add**, add this runtime Secret, and click **Deploy** to save it:
+Click **Save and Deploy** to create the Worker. The first build fails verification because the administrator Secret is missing; do not use the site URL yet. Under the Worker's **Settings** → **Variables and Secrets**, click **Add**, add this runtime Secret, and click **Deploy**:
| Type | Name | Value | Purpose |
| :--- | :--- | :--- | :--- |
| **Secret** | `EDGE_EVER_AUTH_PASSWORD` | Preferably at least 32 characters and unique to this instance | Administrator login password |
-`EDGE_EVER_AUTH_PASSWORD` is the variable name; the Secret value is the administrator login password you choose. It is a Worker runtime Secret, not a Workers Builds variable, so do not duplicate the password in build variables.
-
-Return to the Worker's build history and retry the failed build. Cloudflare applies the current build settings when retrying. Continue only after the build, deployment, and live health check succeed. If the first build succeeded, still confirm that this Secret is present.
-
----
-
-### Step 5: Check the Build Result
-
-Keep the default deploy command filled in by Cloudflare:
-
-```text
-Deploy command: npx wrangler deploy
-```
-
-The repository's Wrangler compatibility entrypoint detects Workers Builds and routes the default command through EdgeEver's complete build, database migration, deployment, and live verification pipeline. You do not need to copy a custom command, and the D1 placeholder in `wrangler.toml` cannot be submitted to Cloudflare.
-
-The deployment pipeline automatically looks up the D1 UUID by the `edgeever` database name. Keep the tracked `wrangler.toml` unchanged; deployment rejects instance-specific values committed there. The Workers Builds API token must have D1 read/edit permission.
-
-Existing projects may keep using these explicit commands without changing them:
-
-```text
-Build command: bun install --frozen-lockfile && EDGE_EVER_DEPLOYMENT_TRIGGER=main_push EDGE_EVER_DEPLOYMENT_METHOD=cloudflare_workers_builds bun run build:cloudflare
-Deploy command: bun run deploy:cloudflare-builds
-```
+`EDGE_EVER_AUTH_PASSWORD` is the variable name; its value is the administrator login password. It is a Worker runtime Secret, not a Workers Builds variable.
-After publishing, the CI deployment records the actual public target reported by Wrangler and requests its `/api/health` endpoint. The build fails if the live Worker is missing its `DB` or `RESOURCES` binding, uses an unprepared D1 database, or does not return a healthy response.
+Return to the build history and retry. Confirm the build and live health check succeed.
---
-### Step 6: Verify Deployment, Login & Automatic Updates
+### Step 5: Verify Deployment, Login & Automatic Updates
1. After deployment completes, Cloudflare will assign a default domain (e.g., `https://edgeever.your-subdomain.workers.dev`).
2. Visit the health check endpoint in your browser: `https://<your-domain>/api/health`, and confirm it returns HTTP `200` with:
@@ -113,7 +86,7 @@ You can also pick `stable` / `edge` when manually running the workflow.
## Advanced Configuration: Instance Settings
-Ordinary deployments do not need these settings. To customize an instance, add non-secret values under the Worker's **Settings -> Build -> Build variables and secrets** instead of changing repository files:
+To customize an instance, add non-secret values under the Worker's **Settings → Build → Build variables and secrets**:
| Build variable | Purpose |
| :--- | :--- |
@@ -126,9 +99,9 @@ Ordinary deployments do not need these settings. To customize an instance, add n
| `EDGE_EVER_WORKERS_DEV` | Enable or disable the `workers.dev` route |
| `EDGE_EVER_CUSTOM_DOMAIN` / `EDGE_EVER_ROUTE_PATTERN` | Custom routing |
-To customize the initial administrator username, set `EDGE_EVER_AUTH_USERNAME` before the first build. Ordinary deployments need no configuration and can use the default username `admin`. Changing only this variable after the administrator account exists does not rename that account.
+Set a custom administrator username before the first build; changing the variable later does not rename the account.
-Passwords and other credentials remain Worker runtime Secrets and must never be added to Builds variables. An advanced local deployment may instead use the git-ignored `.env.local` or an external `WRANGLER_CONFIG` file.
+Older deployments need not migrate a custom R2 bucket; upgrades reuse the live `RESOURCES` binding unless overridden. Existing explicit build commands remain supported; see [Workers Builds configuration](cloudflare-workers-builds.md).
---
diff --git a/docs/deploy-cloudflare-button.zh-CN.md b/docs/deploy-cloudflare-button.zh-CN.md
index 54942f26..715f431d 100644
--- a/docs/deploy-cloudflare-button.zh-CN.md
+++ b/docs/deploy-cloudflare-button.zh-CN.md
@@ -1,8 +1,6 @@
# EdgeEver 手动在线部署指南
-本文档为在线部署 EdgeEver 的详细图文操作指南。整个部署流程在浏览器中即可完成,**不需要本地安装任何代码或配置本地环境**。
-
-> 💡 **零成本自托管**:部署完全使用 Cloudflare 免费配额,**无需购买 VPS / 云服务器,也不需要折腾域名证书或 Docker**。
+通过 GitHub 和 Cloudflare 在浏览器中部署 EdgeEver,无需本地安装代码或配置服务器。
---
@@ -13,7 +11,7 @@
---
-## 首次部署图文指南
+## 首次部署
### 步骤 1:Fork 仓库
@@ -24,7 +22,7 @@
### 步骤 2:在 Cloudflare 创建存储与数据库资源
-登录 [Cloudflare Dashboard](https://dash.cloudflare.com/) 控制台。Cloudflare 会调整侧栏分组;找不到入口时,可查看官方的 [D1 创建说明](https://developers.cloudflare.com/d1/get-started/)和 [R2 入门说明](https://developers.cloudflare.com/r2/get-started/):
+登录 [Cloudflare Dashboard](https://dash.cloudflare.com/);入口变化时参考官方的 [D1](https://developers.cloudflare.com/d1/get-started/) 和 [R2](https://developers.cloudflare.com/r2/get-started/) 指南:
1. **创建 D1 数据库**:
- 在 **Storage & databases** 中打开 **D1 SQL Database**,点击 **Create database**。
@@ -37,58 +35,33 @@
### 步骤 3:导入项目
-1. 在 Cloudflare 控制台中打开 **Workers & Pages**,点击 **Create application**,再在 **Import a repository** 旁点击 **Get started**。这里要创建连接 Git 仓库的 Worker 项目;入口变化时可对照 [Cloudflare Workers Builds 官方步骤](https://developers.cloudflare.com/workers/ci-cd/builds/#connect-a-new-worker)。
+1. 打开 **Workers & Pages**,点击 **Create application** → **Import a repository** 旁的 **Get started**。入口变化时参考 [Cloudflare 官方步骤](https://developers.cloudflare.com/workers/ci-cd/builds/#connect-a-new-worker)。
2. 按提示连接 GitHub 账户,授权 Cloudflare 访问该 Fork,并选中您刚才 Fork 的 `edgeever` 仓库。
3. 在项目设置中:
- **Git branch**(或 **Production branch**):选择 `main`
- **Root directory**:保持留空,使用仓库根目录
- - **Deploy command**:保留默认的 `npx wrangler deploy`
+ - Deploy command: npx wrangler deploy(保留默认值)
- **API token**:自动生成的 token 可能没有 D1 权限。选择或创建限定到目标账户、具备 D1 读取与编辑权限的 User API Token;权限不足时按构建日志调整后重试。
-仓库中的部署命令会根据标准资源名称生成 `DB` 与 `RESOURCES` binding。不要修改 `wrangler.toml`,也不要在控制台中重复添加 binding。
-
-按旧版文档创建过自定义 R2 存储桶的已有部署,不需要改名或迁移数据。未显式设置 Builds 变量时,部署命令会读取线上 Worker 当前的 `RESOURCES` binding,并自动继续使用原存储桶。
+部署命令会自动生成 `DB` 与 `RESOURCES` binding,并查询 D1 UUID。不要修改 `wrangler.toml` 或在控制台重复添加 binding。
---
### 步骤 4:创建项目并设置管理员密码
-点击 **Save and Deploy** 创建 Worker 项目。全新部署的首次构建会因尚未配置认证 Secret 而在部署后校验失败;此时先不要使用生成的站点地址。在新建 Worker 的 **Settings** -> **Variables and Secrets** 中点击 **Add**,添加以下运行时 Secret,然后点击 **Deploy** 保存:
+点击 **Save and Deploy** 创建 Worker。首次构建会因缺少管理员 Secret 而校验失败;先不要使用站点地址。在 Worker 的 **Settings** → **Variables and Secrets** 中点击 **Add**,添加运行时 Secret 并点击 **Deploy**:
| 类型 (Type) | 名称 (Name) | 值 (Value) | 说明 |
| :--- | :--- | :--- | :--- |
| **Secret** | `EDGE_EVER_AUTH_PASSWORD` | 建议至少 32 个字符且仅用于此实例的强密码 | 管理员登录密码 |
-`EDGE_EVER_AUTH_PASSWORD` 是变量名,Secret 的值才是您自行设置的管理员登录密码。它属于 Worker 运行时 Secret,不是 Workers Builds 构建变量;无需、也不应把密码重复填写到构建变量中。
-
-返回 Worker 的构建记录,重试失败的构建。Cloudflare 会在重试时使用当前的构建设置;确认构建、部署和线上健康检查都成功后再继续。若首次构建已成功,也应确认此 Secret 已存在。
-
----
-
-### 步骤 5:检查构建结果
-
-保留 Cloudflare 自动填写的默认部署命令:
-
-```text
-Deploy command: npx wrangler deploy
-```
-
-仓库提供的 Wrangler 兼容入口会识别 Workers Builds,并自动将默认命令接入 EdgeEver 的完整构建、数据库迁移、部署及线上验证流水线。因此无需复制自定义命令,也不会把 `wrangler.toml` 中的 D1 占位符提交给 Cloudflare。
-
-部署流水线会根据 `edgeever` 数据库名称自动查询 D1 UUID。受版本控制的 `wrangler.toml` 必须保持不变;若把实例专属配置提交到该文件,部署会直接拒绝。Workers Builds API Token 必须具有 D1 读取和编辑权限。
-
-已有项目继续使用下列显式命令也受支持,无需修改:
-
-```text
-Build command: bun install --frozen-lockfile && EDGE_EVER_DEPLOYMENT_TRIGGER=main_push EDGE_EVER_DEPLOYMENT_METHOD=cloudflare_workers_builds bun run build:cloudflare
-Deploy command: bun run deploy:cloudflare-builds
-```
+`EDGE_EVER_AUTH_PASSWORD` 是变量名,值是管理员登录密码。它属于 Worker 运行时 Secret,不是 Workers Builds 构建变量。
-发布完成后,CI 部署会记录 Wrangler 返回的实际公网入口,并请求该入口的 `/api/health`。如果线上 Worker 缺少 `DB` 或 `RESOURCES` binding、绑定了未初始化的 D1,或没有返回健康状态,构建会直接失败。
+返回构建记录并重试,确认构建及线上健康检查成功。
---
-### 步骤 6:验证部署、登录与自动更新
+### 步骤 5:验证部署、登录与自动更新
1. 构建完成后,Cloudflare 会为您生成一个二级域名(如 `https://edgeever.your-subdomain.workers.dev`)。
2. 在浏览器打开该域名下的健康检查接口:`https://你的域名/api/health`,确认返回 `200` 及 JSON:
@@ -113,7 +86,7 @@ EDGE_EVER_UPDATE_CHANNEL=edge
## 高级配置:实例参数
-普通部署不需要配置以下参数。如需自定义实例,请在 Worker 的 **Settings -> Build -> Build variables and secrets** 中添加非敏感构建变量,不要修改仓库文件:
+自定义实例时,在 Worker 的 **Settings → Build → Build variables and secrets** 中添加非敏感构建变量:
| 构建变量 | 用途 |
| :--- | :--- |
@@ -126,9 +99,9 @@ EDGE_EVER_UPDATE_CHANNEL=edge
| `EDGE_EVER_WORKERS_DEV` | 启用或禁用 `workers.dev` 路由 |
| `EDGE_EVER_CUSTOM_DOMAIN` / `EDGE_EVER_ROUTE_PATTERN` | 自定义路由 |
-如需自定义初始管理员用户名,请在首次构建前设置 `EDGE_EVER_AUTH_USERNAME`。普通部署无需配置,直接使用默认用户名 `admin` 即可;管理员账号已创建后,仅修改该变量不会重命名现有账号。
+自定义管理员用户名须在首次构建前设置;账号创建后修改该变量不会重命名账号。
-密码及其他凭据始终属于 Worker 运行时 Secret,绝不能放入 Builds 构建变量。高级本地部署也可以使用被 Git 忽略的 `.env.local`,或仓库外部的 `WRANGLER_CONFIG` 文件。
+旧部署的自定义 R2 存储桶无需迁移;不设置覆盖变量时,升级会沿用线上 `RESOURCES` binding。已有项目的显式构建命令也可继续使用,详见 [Workers Builds 配置](cloudflare-workers-builds.zh-CN.md)。
---