2.8 KiB
2.8 KiB
GitHub Pages 部署指南
📝 已创建的文件
在 docs/ 文件夹中已经创建了以下文件:
- ✅
index.html- 首页 - ✅
privacy-policy.html- 隐私政策 - ✅
terms-of-service.html- 服务条款 - ✅
README.md- 文档说明
🚀 部署步骤
1. 更新个人信息(重要!)
在发布前,你需要检查以下信息是否已更新:
在所有 HTML 文件中:
- ✅ 邮箱已更新为
focusbuddy.app@outlook.com
在 terms-of-service.html 中:
- ✅ 国家/地区已更新为
the People's Republic of China - ✅ 法律管辖区已更新为
the People's Republic of China
所有占位符都已替换完成!
2. 推送到 GitHub
# 添加所有文件
git add docs/
# 提交
git commit -m "Add GitHub Pages documentation"
# 推送到 GitHub
git push origin main
3. 在 GitHub 上启用 GitHub Pages
- 打开你的 GitHub 仓库页面
- 点击 Settings(设置)
- 在左侧菜单找到 Pages
- 在 "Source" 下:
- Branch: 选择
main - Folder: 选择
/docs
- Branch: 选择
- 点击 Save
- 等待 1-2 分钟,页面会显示部署状态
4. 获取 URL
部署成功后,你会看到类似这样的 URL:
https://yourusername.github.io/focusbuddy/
你的文档链接将是:
- 隐私政策:
https://yourusername.github.io/focusbuddy/privacy-policy.html - 服务条款:
https://yourusername.github.io/focusbuddy/terms-of-service.html
📱 在应用商店使用这些 URL
当你提交应用到 Google Play 或 App Store 时:
Google Play Console:
- 进入 "Store presence" → "App content"
- 找到 "Privacy policy"
- 粘贴你的隐私政策 URL
App Store Connect:
- 在 "App Information" 部分
- 找到 "Privacy Policy URL"
- 粘贴你的隐私政策 URL
✅ 测试
部署后,在浏览器中打开以下 URL 测试:
https://yourusername.github.io/focusbuddy/https://yourusername.github.io/focusbuddy/privacy-policy.htmlhttps://yourusername.github.io/focusbuddy/terms-of-service.html
确保所有页面都能正常访问,且内容显示正确。
🔄 更新文档
如果你需要更新隐私政策或服务条款:
- 编辑
docs/中的相应 HTML 文件 - 更新 "Last Updated" 日期
- 提交并推送到 GitHub
- 等待几分钟,更改会自动生效
💡 提示
- GitHub Pages 是完全免费的
- 支持 HTTPS(自动启用)
- 无需域名(使用 github.io 子域名)
- 可以绑定自定义域名(可选)
❓ 问题排查
如果页面无法访问:
- 确认 GitHub Pages 已在设置中启用
- 检查文件是否在
docs/文件夹中 - 确认分支是
main - 等待 5-10 分钟(首次部署可能需要更长时间)
- 清除浏览器缓存后重试