Skip to content

Commit 3ee99ca

Browse files
authored
docs: add vercel instructions
1 parent a15bd3c commit 3ee99ca

11 files changed

+63
-11
lines changed

README.md

+13-6
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ One-Click to deploy well-designed ChatGPT web UI on Vercel.
7676

7777
## FAQ
7878

79-
[简体中文 > 常见问题](./docs/faq-cn.md) | [English > FAQ](./docs/faq.en.md)
79+
[简体中文 > 常见问题](./docs/faq-cn.md)
80+
81+
[English > FAQ](./docs/faq-en.md)
8082

8183
## Keep Updated
8284

@@ -86,13 +88,18 @@ If you have deployed your own project with just one click following the steps ab
8688

8789
We recommend that you follow the steps below to re-deploy:
8890

89-
- Delete the original repo;
90-
- Fork this project;
91-
- Go to the Vercel dashboard, delete the original project, then create a new project and select the project you just forked to redeploy;
92-
- Please manually add an environment variable named `OPENAI_API_KEY` and enter your API key as the value during the redeploy process.
91+
- Delete the original repository;
92+
- Use the fork button in the upper right corner of the page to fork this project;
93+
- Choose and deploy in Vercel again, [please see the detailed tutorial](./docs/vercel-en.md#how-to-create-a-new-project).
94+
95+
## Enable Automatic Updates
96+
After forking the project, due to the limitations imposed by Github, you need to manually enable Workflows and Upstream Sync Action on the Actions page of the forked project. Once enabled, automatic updates will be scheduled every hour:
97+
98+
![Automatic Updates](./docs/images/enable-actions.jpg)
9399

94-
This project will be continuously updated, and after forking the project, the upstream code will be automatically synchronized every day without additional operations.
100+
![Enable Automatic Updates](./docs/images/enable-actions-sync.jpg)
95101

102+
### Manually Updating Code
96103
If you want to update instantly, you can check out the [Github documentation](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork) to learn how to synchronize a forked project with upstream code.
97104

98105
You can star or watch this project or follow author to get release notifictions in time.

README_CN.md

+11-5
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,18 @@
3838
如果你按照上述步骤一键部署了自己的项目,可能会发现总是提示“存在更新”的问题,这是由于 Vercel 会默认为你创建一个新项目而不是 fork 本项目,这会导致无法正确地检测更新。
3939
推荐你按照下列步骤重新部署:
4040

41-
- 删除掉原先的 repo;
42-
- fork 本项目;
43-
- 前往 vercel 控制台,删除掉原先的 project,然后新建 project,选择你刚刚 fork 出来的项目重新进行部署即可;
44-
- 在重新部署的过程中,请手动添加名为 `OPENAI_API_KEY` 的环境变量,并填入你的 api key 作为值。
41+
- 删除掉原先的仓库;
42+
- 使用页面右上角的 fork 按钮,fork 本项目;
43+
- 在 Vercel 重新选择并部署,[请查看详细教程](./docs/vercel-cn.md#如何新建项目)
4544

46-
本项目会持续更新,当你 Fork 项目之后,默认会每天自动同步上游代码,无需额外操作。
45+
### 打开自动更新
46+
当你 fork 项目之后,由于 Github 的限制,需要手动去你 fork 后的项目的 Actions 页面启用 Workflows,并启用 Upstream Sync Action,启用之后即可开启每小时定时自动更新:
47+
48+
![自动更新](./docs/images/enable-actions.jpg)
49+
50+
![启用自动更新](./docs/images/enable-actions-sync.jpg)
51+
52+
### 手动更新代码
4753

4854
如果你想让手动立即更新,可以查看 [Github 的文档](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork) 了解如何让 fork 的项目与上游代码同步。
4955

docs/faq.en.md docs/faq-en.md

File renamed without changes.

docs/images/enable-actions-sync.jpg

137 KB
Loading

docs/images/enable-actions.jpg

130 KB
Loading
85.2 KB
Loading
131 KB
Loading
106 KB
Loading
111 KB
Loading
102 KB
Loading

docs/vercel-cn.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Vercel 的使用说明
2+
3+
## 如何新建项目
4+
当你从 Github fork 本项目之后,需要重新在 Vercel 创建一个全新的 Vercel 项目来重新部署,你需要按照下列步骤进行。
5+
6+
![vercel-create-1](./images/vercel/vercel-create-1.jpg)
7+
1. 进入 Vercel 控制台首页;
8+
2. 点击 Add New;
9+
3. 选择 Project。
10+
11+
![vercel-create-2](./images/vercel/vercel-create-2.jpg)
12+
1. 在 Import Git Repository 处,搜索 chatgpt-next-web;
13+
2. 选中新 fork 的项目,点击 Import。
14+
15+
![vercel-create-3](./images/vercel/vercel-create-3.jpg)
16+
1. 在项目配置页,点开 Environmane Variables 开始配置环境变量;
17+
2. 依次新增名为 OPENAI_API_KEY 和 CODE 的环境变量;
18+
3. 填入环境变量对应的值;
19+
4. 点击 Add 确认增加环境变量;
20+
5. 请确保你添加了 OPENAI_API_KEY,否则无法使用;
21+
6. 点击 Deploy,创建完成,耐心等待 5 分钟左右部署完成。
22+
23+
## 如何增加自定义域名
24+
[TODO]
25+
26+
## 如何更改环境变量
27+
![vercel-env-edit](./images/vercel/vercel-env-edit.jpg)
28+
1. 进去 Vercel 项目内部控制台,点击顶部的 Settings 按钮;
29+
2. 点击左侧的 Environment Variables;
30+
3. 点击已有条目的右侧按钮;
31+
4. 选择 Edit 进行编辑,然后保存即可。
32+
33+
⚠️️ 注意:每次修改完环境变量,你都需要[重新部署项目](#如何重新部署)来让改动生效!
34+
35+
## 如何重新部署
36+
![vercel-redeploy](./images/vercel/vercel-redeploy.jpg)
37+
1. 进入 Vercel 项目内部控制台,点击顶部的 Deployments 按钮;
38+
2. 选择列表最顶部一条的右侧按钮;
39+
3. 点击 Redeploy 即可重新部署。

0 commit comments

Comments
 (0)