From 38c0820c6512d8674a47f11c5804ce3a4ea9970d Mon Sep 17 00:00:00 2001 From: Jing Hua Date: Wed, 15 Mar 2023 22:01:32 +0800 Subject: [PATCH] update README --- README-zh_CN.md | 19 ++++++++++++++----- README.md | 22 ++++++++++++++++------ 2 files changed, 30 insertions(+), 11 deletions(-) diff --git a/README-zh_CN.md b/README-zh_CN.md index 5e9486d..24e274b 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -117,15 +117,24 @@ Free ChatGPT 已经包含了大量的功能。您可以使用以下功能: 1. 创建一个 GitHub 账户(如果您还没有账户)。 2. 给此[存储库](https://github.com/ztjhz/FreeChatGPT) 一个星星 ⭐️ 3. Fork 此[存储库](https://github.com/ztjhz/FreeChatGPT) -4. 在您的 forked 存储库中点击 `Actions` +4. 如果你不使用自定义域名,需要配置你的 `vite.config.ts` 文件,在 `export default defineConfig({...})` 块内添加 `base: '//'`,其中 `` 是你的 GitHub 仓库名称,可以从 `https://.github.io/` 获得(如果你没有改过,`` 应该是 `FreeChatGPT`)。代码应该是这样的 + + ```js + export default defineConfig({ + base: '/REPO/', + /* 其余的配置在这里 */ + }); + ``` + +5. 在您的 forked 存储库中点击 `Actions` ![image](https://user-images.githubusercontent.com/59118459/223751928-cf2b91b9-4663-4a36-97de-5eb751b32c7e.png) -5. 在左侧边栏中,点击 `Deploy to GitHub Pages` +6. 在左侧边栏中,点击 `Deploy to GitHub Pages` ![image](https://user-images.githubusercontent.com/59118459/223752459-183ec23f-72f5-436e-a088-e3386492b8cb.png) -6. 在运行的工作流列表上方,选择 `Run workflow` 。 +7. 在运行的工作流列表上方,选择 `Run workflow` 。 ![image](https://user-images.githubusercontent.com/59118459/223753340-1270e038-d213-4d6f-938c-66a30dad7c88.png) -7. 现在,转到 `Settings` 选项卡 +8. 现在,转到 `Settings` 选项卡 ![image](https://user-images.githubusercontent.com/59118459/223753577-9b6f8266-26e8-471b-8f45-a1a02fbab232.png) -8. 在左侧边栏中,单击 `Pages` ,在右侧区域中,为 `Source` 选择 `Deploy from a branch`,为 `Branch` 选择 `gh-pages`。然后在顶部部分,您可以看到 "Your site is live at `XXX`"。 +9. 在左侧边栏中,单击 `Pages` ,在右侧区域中,为 `Source` 选择 `Deploy from a branch`,为 `Branch` 选择 `gh-pages`。然后在顶部部分,您可以看到 "Your site is live at `XXX`"。 ![image](https://user-images.githubusercontent.com/59118459/223753724-89f6452e-a441-48b8-8665-7a5e515d2a57.png) ### 在本地运行 diff --git a/README.md b/README.md index 56b775a..a3a594e 100644 --- a/README.md +++ b/README.md @@ -124,16 +124,26 @@ If you'd like to run your own instance of Free ChatGPT, you can easily do so by 1. Create a GitHub account (if you don't have one already) 2. Star this [repository](https://github.com/ztjhz/FreeChatGPT) ⭐️ 3. Fork this [repository](https://github.com/ztjhz/FreeChatGPT) -4. In your forked repository, click on `Actions` +4. If you are not using custom domain, configure your `vite.config.ts` file by adding `base: '//'` inside the `export default defineConfig({...})` block, where `` is the name of your repository on GitHub, obtained from `https://.github.io/` (`` should be `FreeChatGPT` if you did not change it). The code should look like this: + + ```js + export default defineConfig({ + base: '/REPO/', + /* Rest of the configuration here */ + }); + ``` + +5. Repository settings > Secrets > Actions > General > Tick "Read and write permissions" +6. In your forked repository, click on `Actions` ![image](https://user-images.githubusercontent.com/59118459/223751928-cf2b91b9-4663-4a36-97de-5eb751b32c7e.png) -5. In the left sidebar, click on `Deploy to GitHub Pages` +7. In the left sidebar, click on `Deploy to GitHub Pages` ![image](https://user-images.githubusercontent.com/59118459/223752459-183ec23f-72f5-436e-a088-e3386492b8cb.png) -6. Above the list of workflow runs, select `Run workflow`. +8. Above the list of workflow runs, select `Run workflow`. ![image](https://user-images.githubusercontent.com/59118459/223753340-1270e038-d213-4d6f-938c-66a30dad7c88.png) -7. Now, navigate to the `Settings` tab +9. Now, navigate to the `Settings` tab ![image](https://user-images.githubusercontent.com/59118459/223753577-9b6f8266-26e8-471b-8f45-a1a02fbab232.png) -8. In the left sidebar, click on `Pages` and in the right section, select `Deploy from a branch` for `Source` and `gh-pages` for `Branch`. Then at the top section, you can see that "Your site is live at `XXX`". - ![image](https://user-images.githubusercontent.com/59118459/223753724-89f6452e-a441-48b8-8665-7a5e515d2a57.png) +10. In the left sidebar, click on `Pages` and in the right section, select `Deploy from a branch` for `Source` and `gh-pages` for `Branch`. Then at the top section, you can see that "Your site is live at `XXX`". + ![image](https://user-images.githubusercontent.com/59118459/223753724-89f6452e-a441-48b8-8665-7a5e515d2a57.png) ### Running it locally