How to Publish a Resume in React to Github Pages
Publishing to Github Pages is easier than building a resume. If you have built a resume, you can use that or you can go to https://github.com/shanshaji/resume and clone the repo to get a pre built React resume. You can use any language or framework you want to build a web page.
If you decided to clone the repo, let me walk you through the changes you need to make, so that you don't end up with my name in your resume.
- Replace /src/resumeData/profilepic.jpg with your profile picture.
- Replace /src/resumeData/resume.pdf with your resume.
- Edit /src/resumeData.json file to include your details (you don't need react knowledge to edit this page. Just change the value but don't change the key.)
- Go in to project root from terminal and do
npm i
andnpm run build
- The build folder contains your resume. Copy it and paste it somewhere safe.
- cd in to the build folder from terminal .
- Type
git init
and press enter.git init
creates a new empty git repository
After introducing git to the build folder which contains your resume, we need to add all the untracked files to the git repository. To see all the untracked files in the repository type git status
from terminal.
8. Type git add .
from the terminal to add all untracked files.
The .
tells git to add all the files. After adding the files to git repository, we need to commit the changes which we added.
9. git commit -m “My Resume”
-m
will let us write a commit message inline. You can choose whatever message you like.
If we type git status
again you can see all the changes have been committed:
On branch master
nothing to commit, working tree clean
10. Head over to GitHub and create a new public repository named username.github.io where username is your username (or organization name) on GitHub.
NOTE: If the first part of the repository doesn’t exactly match your username, it won’t work, so make sure to get it right.
After creating the repository follow the steps in push an existing repository from the command line.
11. Click on the ‘copy’ icon on the upper right corner under push an existing repository from the command line and paste it in the terminal with the build folder open and press enter.
It will push your existing repository to Github. You can reload the Github page to see your repo in there and that’s it. Your resume is ready!
Fire up a browser and go to https://username.github.io.