我有一个基本的React应用程序。没有后端。我想在github页面上设置它。我跟着这篇文章两次。 https://medium.freecodecamp.org/surge-vs-github-pages-deploying-a-create-react-app-project-c0ecbf317089
两次,Github Pages都会在我的公用文件夹中显示README.md文件而不是index.html文件。这是应用程序的文件目录的图像。有什么想法吗?
{
"name": "react-blog",
"version": "0.1.0",
"private": true,
"homepage": "https://jackseabolt.github.io/react-blog/",
"dependencies": {
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-scripts": "1.0.14"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"predeploy": "npm run build",
"deploy" : "npm run build&&gh-pages -d build"
},
"devDependencies": {
"gh-pages": "^1.0.0"
}
}
答案 0 :(得分:2)
您的问题可能是您使用master分支作为来源。在Github项目页面的设置标签中,将源更改为使用gh-pages分支。