Skip to content

Instantly share code, notes, and snippets.

@humorless
Created May 27, 2020 07:23
Show Gist options
  • Save humorless/51cdef68ffc02a5e70810568e1c11cbd to your computer and use it in GitHub Desktop.
Save humorless/51cdef68ffc02a5e70810568e1c11cbd to your computer and use it in GitHub Desktop.
How to create github project pages
  1. Create gh-pages branch
git checkout --orphan gh-pages
git rm -rf .    # 砍掉所有檔案重來
...  # 加新檔案
git add .
git commit -m 'create new branch'

Push this branch to github repo

  1. Add CNAME files

  2. Setup CNAME record at DNS server

  3. change github repot setting to allow custom domain name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment