Mastering Development

Deploying personal github pages (React App) just shows Readme

I’m trying to deploy a user-github page at So not a project page. However, after following steps online, I’m met with just the

The existing questions about problems releated to this are for github pages (, whilst this is just for


npm install gh-pages --save-dev

in package.json:

  "homepage": "",
  "name": "homepage",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@material-ui/core": "^4.9.14",
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.3.2",
    "@testing-library/user-event": "^7.1.2",
    "bootstrap": "^4.4.1",
    "react": "^16.13.1",
    "react-bootstrap": "^1.0.1",
    "react-dom": "^16.13.1",
    "react-scripts": "3.4.1",
    "react-spring": "^8.0.27"
  "scripts": {
    "predeploy": "npm run build",
    "deploy": "gh-pages -d build",
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"

  "eslintConfig": {
    "extends": "react-app"
  "browserslist": {
    "production": [
      "not dead",
      "not op_mini all"
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
  "devDependencies": {
    "gh-pages": "^2.2.0"

Then push to the gh-pages pages branch using

npm run deploy which says that my page is published. The branch gh-pages exist on github.

In this step from
enter image description here

I’m not able to change the source, so I try to publish to the master branch with gh-pages:


var ghpages = require("gh-pages");

    branch: "master",
    repo: "",
  () => {

However, I still get the when I go to the url for the user page. It does not look master is changing after I run node publishfile.js. enter image description here

Leave a Reply

Your email address will not be published. Required fields are marked *