Have some projects that are finished. They don't need to be extravagant. Just show that you can ship code and know how to explain how/why to use it in the README or for extra points a nice gh-pages demo page. Once you have a few projects under your belt, you can create a nice home for them with your username by making a public repo with a project name of username.github.com - see https://pages.github.com
For front end, if you prefer codepen over Github as your online code portfolio of choice, that is fine too (at least in my opinion). Or both.