Skip to content

Commit c30a060

Browse files
authored
Update GitHub Actions and README (yihong0618#611)
* Update GitHub Pages+Custom domain instruction in README.md * update gh-pages.yml * update actions version in run_data_sync.yml * Added zh instrustion for custom domain with github.io and yer1k's running page link
1 parent c2ccce1 commit c30a060

File tree

4 files changed

+17
-16
lines changed

4 files changed

+17
-16
lines changed

.github/workflows/gh-pages.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ jobs:
4646
# Steps represent a sequence of tasks that will be executed as part of the job
4747
steps:
4848
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
49-
- uses: actions/checkout@v3
49+
- uses: actions/checkout@v4
5050
with:
5151
# if your default branches is not master, please change it here
5252
ref: master
5353

5454
- name: Cache Data Files
5555
if: inputs.save_data_in_github_cache
56-
uses: actions/cache@v3
56+
uses: actions/cache@v4
5757
with:
5858
path: |
5959
activities
@@ -71,9 +71,9 @@ jobs:
7171
${{ inputs.data_cache_prefix }}-
7272
7373
- name: Setup Node.js environment
74-
uses: actions/setup-node@v3
74+
uses: actions/setup-node@v4
7575
with:
76-
node-version: '18'
76+
node-version: '20'
7777

7878
- uses: pnpm/action-setup@v2
7979
name: Install pnpm
@@ -86,7 +86,7 @@ jobs:
8686
run: |
8787
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
8888
89-
- uses: actions/cache@v3
89+
- uses: actions/cache@v4
9090
name: Setup pnpm cache
9191
with:
9292
path: ${{ env.STORE_PATH }}
@@ -100,10 +100,10 @@ jobs:
100100
run: PATH_PREFIX=/${{ github.event.repository.name }} pnpm build
101101

102102
- name: Upload artifact
103-
uses: actions/upload-pages-artifact@v1
103+
uses: actions/upload-pages-artifact@v2
104104
with:
105105
# Upload dist repository
106106
path: './dist'
107107
- name: Deploy to GitHub Pages
108108
id: deployment
109-
uses: actions/deploy-pages@v1
109+
uses: actions/deploy-pages@v3

.github/workflows/run_data_sync.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ jobs:
4949

5050
steps:
5151
- name: Checkout
52-
uses: actions/checkout@v3
52+
uses: actions/checkout@v4
5353

5454
- name: Set up Python
5555
id: setup_python
56-
uses: actions/setup-python@v4
56+
uses: actions/setup-python@v5
5757
with:
5858
python-version: '3.10'
5959
cache: pip
@@ -65,7 +65,7 @@ jobs:
6565
6666
- name: Cache Data Files
6767
if: env.SAVE_DATA_IN_GITHUB_CACHE == 'true'
68-
uses: actions/cache@v3
68+
uses: actions/cache@v4
6969
with:
7070
path: |
7171
activities

README-CN.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ R.I.P. 希望大家都能健康顺利的跑过终点,逝者安息。
9696
| [Jeffggmm](https://github.com/Jeffggmm) | <https://jeffggmm.github.io/workouts_page/> | Garmin |
9797
| [s1smart](https://github.com/s1smart) | <https://s1smart.github.io/running_page/> | Strava |
9898
| [Ryan](https://github.com/85Ryan) | <https://85ryan.github.io/gooorun/> | Strava |
99-
| [PPZ](https://github.com/8824PPZ) | <https://run.dudubbbbbbbbb.top/> | Strava |
99+
| [PPZ](https://github.com/8824PPZ) | <https://run.dudubbbbbbbbb.top/> | Strava |
100+
| [Yer1k](https://github.com/Yer1k) | <https://running.yer1k.com/> | Strava |
100101
</details>
101102

102103
## 它是怎么工作的
@@ -956,11 +957,11 @@ python3(python) run_page/gen_svg.py --from-db --type circular --use-localtime
956957
4. 为 GitHub Actions 添加代码提交权限,访问仓库的 `Settings > Actions > General`页面,找到 `Workflow permissions` 的设置项,将选项配置为 `Read and write permissions`,支持 CI 将运动数据更新后提交到仓库中。
957958

958959

959-
5. 如果想把你的 running_page 部署在 xxx.github.io 而不是 xxx.github.io/run_page,需要做三点
960+
5. 如果想把你的 running_page 部署在 xxx.github.io 而不是 xxx.github.io/run_page 亦或是想要添加自定义域名于 GitHub Pages,需要做三点
960961

961962
- 修改你的 fork 的 running_page 仓库改名为 xxx.github.io, xxx 是你 github 的 username
962963
- 修改 gh-pages.yml 中的 Build 模块,删除 `${{ github.event.repository.name }}` 改为`run: PATH_PREFIX=/ pnpm build` 即可
963-
- src/static/site-metadata.ts 中 `siteUrl: ''` 即可
964+
- 修改 src/static/site-metadata.ts 中 `siteUrl: ''` 或是添加你的自定义域名,`siteUrl: '[your_own_domain]'` 即可
964965

965966
</details>
966967

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ English | [简体中文](https://github.com/yihong0618/running_page/blob/master/
9494
| [XmchxUp](https://github.com/XmchxUp) | <https://xmchxup.github.io/running_page/> | Strava |
9595
| [Ryan](https://github.com/85Ryan) | <https://85ryan.github.io/gooorun/> | Strava |
9696
| [PPZ](https://github.com/8824PPZ) | <https://run.dudubbbbbbbbb.top/> | Strava |
97-
| [Yer1k](https://github.com/Yer1k) | <https://yer1k.github.io/running_page/> | Strava |
97+
| [Yer1k](https://github.com/Yer1k) | <https://running.yer1k.com/> | Strava |
9898
</details>
9999

100100
## How it works
@@ -776,11 +776,11 @@ For more display effects, see:
776776

777777
4. make sure you have write permissions in Workflow permissions settings.
778778

779-
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:
779+
5. If you want to deploy your running_page to xxx.github.io instead of xxx.github.io/running_page or redirect your GitHub Pages to a custom domain, you need to do three things:
780780

781781
- Rename your forked running_page repository to `xxx.github.io`, where xxx is your GitHub username
782782
- Modify the Build module in gh-pages.yml, remove `${{ github.event.repository.name }}` and change to `run: PATH_PREFIX=/ pnpm build`
783-
- In `src/static/site-metadata.ts`, set siteUrl: ''
783+
- In `src/static/site-metadata.ts`, set siteUrl: '' or your custom domain URL
784784

785785
</details>
786786

0 commit comments

Comments
 (0)