So, you've just deployed a site with Github pages. But when you go to the url (
https://repo-name-here.github.io/), you're only seeing the ReadMe. Where's all your work?
You need to do two things:
- Go to the settings page of the corresponding Github repo. Scroll down to the section titled GitHub Pages. Where it says source, change the branch to be
gh-pagesand the folder to be
/(root). Hit save.
- Go to your terminal of choice.
cdinto your project directory. Ensure you're on the master branch (or whatever is your root branch). Run
npm run deploy.
Go to your project url and hard refresh (
r). If you don't see your website, give it a few minutes to update.
Note: adding/committing/pushing does not update what you see at the url of your site, it only updates the repo history on Github. If you want to actually update your site, you must use
npm run deploy- per the set up described in this helpful tutorial.
Hope this helps. I've ran into this annoyance twice, so I thought it was worth sharing for anyone else in this dilemma. 😊