Publishing to GitHub Pages
Last updated
Last updated
Now that your repository is created, you can publish your repository to GitHub Pages.
First, go to the Settings tab on the GitHub page for your newly created repository.
Click on the Pages option in the sidebar.
Under the "Branch" section, select master
from the dropdown and click Save. It takes a minute for the master
branch to be created in a new repository, so if master
isn't available in the dropdown, try refreshing the page.
Once you have that setting enabled, your repository will be automatically published to GitHub Pages!
The publishing doesn't happen immediately, as GitHub needs to do some work in the background to make it happen. For this first time, the publishing process could take a few minutes. Go get a coffee, hit the can, call your mother... and when you come back, refresh your Settings page, and you should see the a new text box appear telling you that your site is now live!
(You can also view the progress of your GitHub Pages deployments by looking in the Environments section of the sidebar on your main repository page.)
Click on the "Visit site" button to go to your website, hosted from your very own GitHub account! WOO HOO! It looks exactly like the sample webcomic for now. You will learn how to update your website in a later section.
A Tale of Two GitHub URLs
You now have two different URLs to keep track of: Your GitHub repository URL, and your GitHub Pages URL. Both of these URLs are automatically generated based on your GitHub account name and your webcomic repository name.
Example:
GitHub account name: marco262 Repository name: sample-comic GitHub repository URL: https://github.com/marco262/sample-comic GitHub Pages URL: https://marco262.github.io/sample-comic
Your GitHub Pages URL is what you will need to give to anyone who wants to read your comic.
If you like, you can even set a custom domain rather than using the default one.