Skip to content

Commit fc460bb

Browse files
committed
📄docs(readme): 添加部署方式, 简化Gh Pages部署步骤
1 parent e9fcb22 commit fc460bb

3 files changed

Lines changed: 57 additions & 15 deletions

File tree

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 谱面列表
22
CHARTS_SOURCE=https://charts.phicm.focalors.ltd
3-
# 谱面列表(CF
3+
# 谱面列表(CloudFlare
44
CHARTS_SOURCE_CF=https://cf.charts.phicm.focalors.ltd
55
# 谱面列表(Vercel)
66
CHARTS_SOURCE_VERCEL=https://vercel.charts.phicm.focalors.ltd

.github/workflows/page-deployment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
workflow_dispatch:
78

89
jobs:
910
build:

README.md

Lines changed: 55 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,55 @@
1-
# 这是什么?
2-
3-
这是一款名为`PhiCommunity`的节奏游戏分支版本,它仿照`Phigros`制作,源仓库为[PhiCommunity](https://github.com/yuameshi/phicommunity)
4-
5-
# APP 已发布(原作者仓库)
6-
7-
请前往[Actions - PhiCommunityAPP](https://github.com/yuameshi/PhiCommunityAPP/actions)的最新构建下载 Artifact,此构建为`Debug`构建,仅用于测试。
8-
9-
您也可以前往[Releases - PhiCommunityAPP](https://github.com/yuameshi/PhiCommunityAPP/releases)下载发行版本(如果有)。
10-
11-
# 许可证
1+
<div align="center">
2+
<img alt="logo" height="80" src="./public/Appicon.png" />
3+
<h1>PhiCommunity Revive</h1>
4+
<p>A fork version of Phicommunity</p>
5+
</div>
6+
<br />
7+
8+
## 这是什么?
9+
10+
这是一款名为`PhiCommunity`的节奏游戏分支可自部署的版本,它仿照`Phigros`制作,源仓库为[PhiCommunity](https://github.com/yuameshi/phicommunity)
11+
12+
## 开始部署
13+
### 部署谱面仓库(可能必要)
14+
部署方法请转到 [PhiCommunity-Charts-Repo](https://github.com/PhiGameRevive/PhiCommunity-Charts-Repo)
15+
16+
### Github Pages部署
17+
1. 点击右上角`Fork`按钮创建当前仓库的副本
18+
> **可选:**`.env`文件中输入自己谱面仓库文件的域名
19+
2. 点击项目界面的`Actions`, 点击绿色按钮启用`Github Actions`(如果有)
20+
3. 点开项目设置, 转到`Pages`选项卡, 应用以下设置
21+
22+
| 设置项 | 设置内容 |
23+
|---------------|-----------------------------------------------------------------------------|
24+
| Source | `Deploy from a branch` |
25+
| Branch | `gh-pages` `/`(root) |
26+
| Custom Domain | 输入你的域名, 在域名控制台添加`CNAME`记录, 内容为`你的用户名.github.io` |
27+
5. 最后点击`Save`保存即可, `Github Actions`应该会自动运行, 如果没有, 在项目页面`Actions`选项卡中, 点击 `Build and Deploy to GitHub Pages` 后选择`Run Workflow`即可
28+
29+
### Vercel部署
30+
1. 重复`Github Pages部署`的步骤一的流程
31+
> **可选:**`.env`文件中输入自己谱面仓库文件的域名
32+
2. 打开[Vercel网站](https://vercel.com), 注册账号, **注册时一定要用国外邮箱, 不然要发工单注册**
33+
3. 注册完成后进入主页面点击`Add New`, 选择`Project`
34+
4. 在仓库选择页面选择你刚刚创建的副本, 随后点击`Deploy`
35+
5. 部署完成后添加域名, 这里不过多赘述
36+
> **注意: 你的域名一定要带`vercel`关键字, 否则仓库链接会使用Github Pages的配置** (其实也不用)
37+
38+
### Cloudflare Pages部署
39+
1. 重复`Github Pages部署`的步骤一的流程, 注册[Cloudflare账号](https://dash.cloudflare.com/sign-up)
40+
> **可选:**`.env`文件中输入自己谱面仓库文件的域名
41+
2. 打开[Cloudflare Dashboard](https://dash.cloudflare.com), 转到`计算(Workers)` ==> `Worker 和 Pages`
42+
3. 单击`创建`, 选项卡选择`Pages`, 选择`导入现有储存库`
43+
4. 登录`Github`账号后选择你刚刚创建的副本, 构建设置按照以下操作
44+
45+
| 构建设置 | 设置内容 |
46+
|---------|-------------|
47+
| 构建命令 | `pnpm i && pnpm build` |
48+
| 构建输出目录 | `dist` |
49+
5. 点击`保存并部署`, 在部署期间可以退出页面设置域名
50+
6. 进入项目页面点击`自定义域`添加自己的域名
51+
> **注意: 你的域名一定要带`cf`关键字, 否则仓库链接会使用Github Pages的配置** (其实也不用)
52+
## 许可证
1253

1354
源代码(不包括多媒体资源,除非另有说明)在[AGPL-3.0](https://www.gnu.org/licenses/agpl-3.0.html)许可下分发
1455

@@ -51,15 +92,15 @@ GNU Affero 通用公共许可证 v3.0
5192
>
5293
> 包括但不限于文件头标识包含 `ogg``mp3``aac``wav``jp(e)g``png``svg``sketch``zip``au3``aup3-shm``aup3-wal``flp` 文件头标识特征的文件。
5394
54-
# 如何贡献
95+
## 如何贡献
5596

5697
如您所见,游戏还没有完成,具体体现在“谱面少”和“性能差”。
5798

58-
## `谱面`做贡献
99+
### `谱面`做贡献
59100

60101
如需提交谱面文件,请前往[此仓库](https://github.com/phigamerevive/PhiCommunity-Charts-Repo)
61102

62-
## 贡献代码
103+
### 贡献代码
63104

64105
如果您想提高该项目的代码质量,请执行上述类似操作:`Fork->Clone->EditCode->Commit->Upload->Open Pull Requests`。不要忘记写下您修改的内容和改进的内容!
65106

0 commit comments

Comments
 (0)