【发布时间】:2018-04-29 08:13:09
【问题描述】:
我正在使用 create-react-app,它从 /build 文件夹提供文件。通常 Github Pages 在根级别查看 index.html,但我想引导它查看 /build 以进行部署。
我尝试在我的 package.json 配置中添加 "homepage": "/build",Github 设置说它是通过 <username>.github.io 部署的。但是,该站点只显示我的 README.md 文件。
任何帮助表示赞赏:)
【问题讨论】:
-
您是否检查了github.com/facebookincubator/create-react-app/blob/master/… 的“部署到 github 页面”部分?有一个详细的分步指南说明如何做到这一点,您无需尝试摆弄 github 页面。
-
是的,我读过这篇文章,但它只告诉了如何为 gh-pages 构建它,这是一个带有 url
<username>.github.io/<repository_name>的项目页面,这不是我想要的。跨度>
标签: html reactjs github deployment