Publish your first website


You've built a website locally. Now it's time to share it with the world!

Let's deploy your website so anyone with an internet connection can see your work. For free with unlimited scalability!

Members only
5 minutes read

The problem

If you've followed the previous lessons, you should have a project folder on your computer with an index.html file — your first webpage.

You've also pushed this folder to GitHub, so your code is safely stored online. But if you share the GitHub link with someone, they'll see... raw HTML code. Not a website.

That's because GitHub shows the source code, not the rendered result. Only a web browser can transform HTML into a real webpage.

The solution: GitHub Pages

GitHub has a built-in feature called GitHub Pages that turns any repository into a live website. 😳

It's free, fast, and perfect for hosting static sites like the ones we're building.

⚠️ On the free GitHub plan, GitHub Pages only works with public repositories. If your repository is private, the option to deploy simply won't show up.

Let me walk you through the whole process: from a GitHub repository to a live website:

From a GitHub repo to a live website with GitHub Pages.

Let's do it!

It's time to follow the same process for your project!

0
Go to your GitHub repository (e.g., github.com/your-username/your-project)
1
Check that your repository is public: you should see a Public label next to its name. If it says Private, go to Settings → General, scroll down to the Danger Zone, and click Change visibility → Public
2
Click Settings in the top menu
3
In the left sidebar, click Pages
4
Under "Source", select Deploy from a branch
5
Choose the main branch and / (root) folder
6
Click Save and wait a minute or two

After a few seconds, your site will be live and your URL will look like this:

https://your-username.github.io/your-repo-name

That's it. Your website is now online.

Oh no! 😱

It seems like you haven't enrolled in the course yet!

This is a lesson from the D3 ❤️ React course, where you learn to create bespoke, interactive graphs with d3.js and React.

Enrollment is currently closed. Join the waitlist to be notified when doors reopen, and get 3 free lessons right away:

Or Login