Deploying Your Website

Once you have built the website and published all the code to Github, you can deploy it online! There are many ways to do that. For example, in the US, you can use Cloudflare Pages (also available in China), Netlify, and Vercel, among other services. However, the easiest way to host your website is to use Github Pages—a free webpage hosting from Github that serves content directly from your repository! Here is how to do it:

Step 1: Rename your repository

In order to have the simplest possible experience and a nice looking domain name, rename your Github repository to <your-github-username>.github.io.

Step 2: Enable Pages in the settings

Go to the "Settings" tab of your repository (should be available at https://github.com/<your-github-username>/<your-repository-name>/settings/pages; make sure to replace the placeholders with your Github handle and repository name). Then, on the left panel, click "Pages". In the newly opened tab, select the source by choosing the "main" branch. A new selection should appear, set by default to "root"—leave it as that. Now, click "Save". The page should refresh and indicate that the website is currently building.

Step 3: Wait for a few minutes

Now, wait for a few minutes (this may take up to 20 minutes). If you've set up everything properly, your website should be available to anyone on the Internet at https://<your-github-username>.github.io/.

For your reference, here is the official guide on deploying your website to Github Pages: https://docs.github.com/en/pages/getting-started-with-github-pages/creating-a-github-pages-site.

Alternative option

If, for some reason, you don't want to use Github Pages, another simple way to publish your website online is to use Cloudflare Pages. For that, you would need to register an account, link your Github account, choose your repository (you don't have to rename it in this case), and publish it. Feel free to follow this tutorial to proceed: https://developers.cloudflare.com/pages/getting-started. Note that, in this case, you will have a different domain name. However, you can purchase a new one using Cloudflare Registrar and connect it to your Cloudflare Pages deployment. You don't need to do that, though.