Reputation: 143
recently I have deployed my first React App on GitHub Pages https://karan-dhingra.github.io/lct/
Now I updated react app and my changes are not reflected on GitHub Pages. But everything was working well on Localhost. So, please guide me on how can I update my deployed React App on GitHub Pages.
Upvotes: 1
Views: 2846
Reputation: 11
As you stated that You have your app running through github gh-pages and You made some changes in your app and you want them to reflect in your gh-pages. You can achieve in following two step
npm run deploy
Enjoy you are good to go.
Upvotes: 0
Reputation: 41
In my case, the lines below have helped. My app is deployed via gh-pages:
git add .
git commit -m '...'
npm run deploy
Upvotes: 0
Reputation: 11
Make sure you save the code in the IDE. after saving check with "git status" command and commit & push to git repo and the changes will be reflected
Upvotes: 0
Reputation: 143
Just we need to run 3-4 commands
git init
git remote ****************.git
[ Here we will add our repository link ending with.git you will found it in the code option in your repo.
npm run deploy
[Make sure you have installed gh pages first]
git add .
git commit -m "Here you write message while committing, you can write anything here"
git push origin master
So, with using these commands everything will work well.
Upvotes: 1