问题
I am currently having an issue having my React App re-render when I commit changes to my GitHub. I believe that the way GitHub Pages works with React is that it runs from a bundle.js
file from a gh-pages
branch of your GitHub. I have read from many StackOverflow questions that when I commit my changes, the website should update automatically, but this does not work at all.
On deeper thought this seems to make sense to me because my gh-pages
branch is not being updated, it is the branch that I work on that is being committed to. When I first properly built and deployed my website, GitHub created the gh-pages
branch on its own, so as far as I know there is no way to commit to it anyways. Does anyone know how I'm supposed to be updating my website properly? Currently I am only able to do this by rerunning the build/deploy command, and I'm pretty sure I'm not supposed to do that more than a few times an hour.
Thank you!
Edit:
Here is a link to my GitHub branch that hosts the files for the GitHub Pages website:
https://github.com/NumaKarolinski/PersonalWebsite/tree/websiteVersion1
Here is a link to my GitHub Pages branch:
https://github.com/NumaKarolinski/PersonalWebsite/tree/gh-pages
来源:https://stackoverflow.com/questions/51425769/how-do-i-get-github-pages-to-re-render-my-react-app