search

Home  >  Q&A  >  body text

Github page doesn't render ReactJs website correctly

<p>I'm trying to deploy a Reactjs website, but my website won't display. This is the link:</p> <p>https://thebestprince.github.io/classy-portfolio/</p> <p>When I run the site on my local computer, everything loads fine in the browser. </p> <p>Any ideas why it doesn't show up? ? ? </p> <p>I expect the webpage to display in the browser just as it would when I run it on my local computer</p>
P粉693126115P粉693126115593 days ago608

reply all(1)I'll reply

  • P粉071626364

    P粉0716263642023-08-11 13:06:38

    To push your changes to the gh-pages branch, you can follow these steps: Clear your local cache:

    git rm -rf .git
    
    git init
    Switch to the gh-pages branch:
    git checkout gh-pages
    Add all your changed files:
    git add .
    Submit your changes:
    git commit -m "部署新更改"
    Push your changes to GitHub:
    git push origin gh-pages

    reply
    0
  • Cancelreply