Skip to content

Commit

Permalink
Update cloudflare-pages-cn.md
Browse files Browse the repository at this point in the history
  • Loading branch information
darth-pika-hu authored May 10, 2023
1 parent 2688914 commit 652d803
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions docs/cloudflare-pages-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,20 @@ npx https://prerelease-registry.devprod.cloudflare.dev/next-on-pages/runs/493084
9. Build output directory 用系统默认,不要改动;
10. Root Directory 不要改动;
11. Environment variables ,点击>,然后Add variable,按如下填写:
NODE_VERSION=20.1
NEXT_TELEMETRY_DISABLE=1
OPENAI_API_KEY=你自己的API Key
YARN_VERSION=1.22.19
PHP_VERSION=7.4
-NODE_VERSION=20.1
-NEXT_TELEMETRY_DISABLE=1
-OPENAI_API_KEY=你自己的API Key
-YARN_VERSION=1.22.19
-PHP_VERSION=7.4
下面的根据实际需要选填:
CODE= 可选填,访问密码,可以使用逗号隔开多个密码。
OPENAI_ORG_ID= 可选填,指定 OpenAI 中的组织 ID
HIDE_USER_API_KEY=1 可选,不让用户自行填入 API Key
DISABLE_GPT4=1 可选,不让用户使用 GPT-4
12. Save and Deploy
-CODE= 可选填,访问密码,可以使用逗号隔开多个密码
-OPENAI_ORG_ID= 可选填,指定 OpenAI 中的组织 ID
-HIDE_USER_API_KEY=1 可选,不让用户自行填入 API Key
-DISABLE_GPT4=1 可选,不让用户使用 GPT-4
12. Save and Deploy;
13. 点Cancel deployment,因为要填 Compatibility flags;
14. 去Build settings, Functions, 找到Compatibility flags;
15. Configure Production compatibility flag 填 nodejs_compat;
16. Configure Preview compatibility flag 填 nodejs_compat;
17. 去 Deployments,点Retry depolyment.
18. Enjoy.

0 comments on commit 652d803

Please sign in to comment.