0

This is the GitHub repository url - ProjectManager There are no any routes.It includes small components and one API.

I followed these steps now.

  1. I switched to the gh-pages branch .
  2. locally run the yarn buildcommand.
  3. It already created a build folder in my project.

But I need to know how to push it in to gh-pages branch.

Aruna Sanjeewa
  • 134
  • 1
  • 11

2 Answers2

4

I found some method to do this

  1. Add this to your package.json file

    "homepage" : "http://<username>.github.io/<reponame>"
    
  2. Add this script to your package.json file

     "deploy": "npm run build&&gh-pages -d build"
    
  3. Install this library .

     npm install --save-dev gh-pages
    
  4. After doing these two steps run this command

    npm run deploy
    

It automatically created a branch named gh-pages and deployed.

Aruna Sanjeewa
  • 134
  • 1
  • 11
0

You need to make sure you're pointing to your build folder and not your root project folder. You can set this in your github repo settings. One way is to use a separate branch with your build folder as root. Or you can point to the build folder (via settings)

rimraf
  • 3,925
  • 3
  • 25
  • 55