创建 upptime 源

  1. 进入 upptime – GitHub ,点击 Use this template。
  2. Create a new repository from upptime,注意勾选Include all branches
  3. 进入源设置,下拉到 GitHub Pages 选项,确认 Source 已经设置为 gh-pages 分支。

设置 PAT

  1. 新建 Personal access token
  • 进入 GitHub 账户 Setttings – Developer settings – Personal access token,点击 Generate new token
  • 新建 token,权限勾选 repo 和 workflow
  • 完成后复制 token
  1. 进入源的设置页面,选择 Secrets,新建 Secret。
  • 将名称设置为 GH_PAT 并填入 token,保存

配置并运行 upptime

  1. 配置 upptime
  • 打开源根目录下的 .upptimerc.yml,编辑以下内容:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Change these first
owner: iwyang # Your GitHub organization or username, where this repository lives(更改用户名)
repo: check # The name of this repository(更改仓库名)

sites:
- name: Bore's Notes
url: https://bore.vip
- name: ConstOwn
url: https://blog.juanertu.com
- name: 01小丁的个人博客
url: https://tding.top
- name: Xu's Blog
url: https://hasaik.com
- name: 02知行志
url: https://baozi.fun
- name: Takagi
url: https://lixingyong.com
- name: 03千与千寻
url: https://www.chihiro.org.cn
- name: Bill Yang's Blog
url: https://blog.bill.moe
- name: Sanarous's Blog
url: https://bestzuo.cn
- name: JACK小桔子的小屋
url: https://jackxjz.top
- name: 04若只如初见
url: https://joyli.net.cn
- name: 05大大的小蜗牛
url: https://eallion.com

status-website:
# Add your custom domain name, or remove the `cname` line if you don't have a domain
# Uncomment the `baseUrl` line if you don't have a custom domain and add your repo name there
# cname: demo.upptime.js.org (如果没有自己的域名,则注释掉cname,取消注释baseUrl)
baseUrl: /check
logoUrl: https://raw.githubusercontent.com/upptime/upptime.js.org/master/static/img/icon.svg
name: Upptime
introTitle: "**Upptime** is the open-source uptime monitor and status page, powered entirely by GitHub."
introMessage: This is a sample status page which uses **real-time** data from our [GitHub repository](https://github.com/upptime/upptime). No server required just GitHub Actions, Issues, and Pages. [**Get your own for free**](https://github.com/upptime/upptime)
navbar:
- title: Status
href: /check # (修改Status的url为repo的名称)
- title: GitHub
href: https://github.com/$OWNER/$REPO

# Upptime also supports notifications, assigning issues, and more
# See https://upptime.js.org/docs/configuration

  • 编辑后 GItHub Actions 会自动更新 upptime 配置信息
  1. 如果 upptime 没有成功运行,可以手动执行 GitHub Actions 中的 Setup 工作流。

效果

参考链接