Skip to content

Commit bbb7a4c

Browse files
nshenclaude
andcommitted
docs: sync English and Chinese README sections
Add missing CLI commands for uploading env files to GitHub Secrets in both English and Chinese sections, and add ALCHEMY_STATE_TOKEN cross-project note. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b84d9f9 commit bbb7a4c

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,20 @@ This project includes a fully configured GitHub Actions workflow (`.github/workf
119119
To enable automated deployment, add the following **Repository Secrets** in your GitHub repository (*Settings -> Secrets and variables -> Actions -> New repository secret*):
120120

121121
1. **`CLOUDFLARE_API_TOKEN`**: Your Cloudflare API Token. Generate one mirroring your permissions by running: `pnpm dlx alchemy util create-cloudflare-token`.
122-
2. **`ALCHEMY_STATE_TOKEN`**: A random 32-character hex string for Alchemy state management. Generate via: `openssl rand -hex 32`.
122+
2. **`ALCHEMY_STATE_TOKEN`**: A random 32-character hex string for Alchemy state management. Generate via: `openssl rand -hex 32`. Must be the same across all projects under the same Cloudflare account.
123123
3. **`CLOUDFLARE_EMAIL`**: Your Cloudflare account login email.
124124
4. **`ENV_SERVER_DEV` / `ENV_SERVER_PROD`**: The full content of your `apps/server/.env` file for the respective environment. This injects your backend environment variables securely.
125125
5. **`ENV_WEB_DEV` / `ENV_WEB_PROD`**: The full content of your `apps/web/.env` file for the respective environment. This injects your frontend environment variables securely.
126126

127+
Upload local env files to GitHub Secrets via CLI:
128+
129+
```bash
130+
gh secret set ENV_SERVER_DEV < apps/server/.dev.env
131+
gh secret set ENV_SERVER_PROD < apps/server/.env
132+
gh secret set ENV_WEB_DEV < apps/web/.dev.env
133+
gh secret set ENV_WEB_PROD < apps/web/.env
134+
```
135+
127136
---
128137

129138
## 📄 License
@@ -251,11 +260,20 @@ pnpm run deploy:prod
251260
要启用自动部署,请在您的 GitHub 仓库中添加以下 **Repository Secrets** (*Settings -> Secrets and variables -> Actions -> New repository secret*):
252261

253262
1. **`CLOUDFLARE_API_TOKEN`**: Cloudflare API 令牌。运行 `pnpm dlx alchemy util create-cloudflare-token` 生成一个包含当前权限的令牌。
254-
2. **`ALCHEMY_STATE_TOKEN`**: 用于 Alchemy 状态管理的随机字符串。可通过 `openssl rand -hex 32` 生成。
263+
2. **`ALCHEMY_STATE_TOKEN`**: 用于 Alchemy 状态管理的随机字符串。可通过 `openssl rand -hex 32` 生成, 如果 cloudflare 下有多个项目必须相同
255264
3. **`CLOUDFLARE_EMAIL`**: 您的 Cloudflare 账号登录邮箱。
256265
4. **`ENV_SERVER_DEV` / `ENV_SERVER_PROD`**: 分别对应各环境下 `apps/server/.env` 文件的完整内容。这确保了后端环境变量的安全注入。
257266
5. **`ENV_WEB_DEV` / `ENV_WEB_PROD`**: 分别对应各环境下 `apps/web/.env` 文件的完整内容。这确保了前端环境变量的安全注入。
258267

268+
通过 CLI 上传本地 env 文件到 GitHub Secrets:
269+
270+
```bash
271+
gh secret set ENV_SERVER_DEV < apps/server/.dev.env
272+
gh secret set ENV_SERVER_PROD < apps/server/.env
273+
gh secret set ENV_WEB_DEV < apps/web/.dev.env
274+
gh secret set ENV_WEB_PROD < apps/web/.env
275+
```
276+
259277
---
260278

261279
## 📄 License

0 commit comments

Comments
 (0)