From ccb1db176219ceee61df6ba84e9f3d7e8e62c18f Mon Sep 17 00:00:00 2001 From: haowei93 <727171008@qq.com> Date: Fri, 3 Nov 2023 20:01:21 +0800 Subject: [PATCH] upd deploy to github-pages (#537) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 更新部署 github-pages 说明 * Update Deploy to Github-pages --------- Co-authored-by: haowei.chen --- README-CN.md | 7 +++++++ README.md | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/README-CN.md b/README-CN.md index 23f11e1518a..80dd71700c5 100644 --- a/README-CN.md +++ b/README-CN.md @@ -906,6 +906,13 @@ python3(python) run_page/gen_svg.py --from-db --type circular --use-localtime 4. 为 GitHub Actions 添加代码提交权限,访问仓库的 `Settings > Actions > General`页面,找到 `Workflow permissions` 的设置项,将选项配置为 `Read and write permissions`,支持 CI 将运动数据更新后提交到仓库中。 + +5. 如果想把你的 running_page 部署在 xxx.github.io 而不是 xxx.github.io/run_page,需要做三点 + +- 修改你的 fork 的 running_page 仓库改名为 xxx.github.io, xxx 是你 github 的 username +- 修改 gh-pages.yml 中的 Build 模块,删除 `${{ github.event.repository.name }}` 改为`run: PATH_PREFIX=/ pnpm build` 即可 +- src/static/site-metadata.ts 中 `siteUrl: ''` 即可 + ## GitHub Actions diff --git a/README.md b/README.md index d0d21176c13..465d07207d4 100644 --- a/README.md +++ b/README.md @@ -720,6 +720,14 @@ For more display effects, see: 4. make sure you have write permissions in Workflow permissions settings. + + +5. If you want to deploy your running_page to xxx.github.io instead of xxx.github.io/running_page, you need to do three things: + +- Rename your forked running_page repository to `xxx.github.io`, where xxx is your GitHub username +- Modify the Build module in gh-pages.yml, remove `${{ github.event.repository.name }}` and change to `run: PATH_PREFIX=/ pnpm build` +- In `src/static/site-metadata.ts`, set siteUrl: '' + ## GitHub Actions