1: リポジトリを用意
- リポジトリを新規作成 https://github.com/new または 既存のリポジトリを使う
- リポジトリ名は、最終的なURLに含まれることを意識しておく
- ユーザ名のrepoにかぎらず、どの公開repoでも可能
2: docs/
以下に静的サイトを用意
- 例
mkdir docs
echo "hello page" > docs/index.html
git add .; git commit -m 'update'
git push origin master
3: GitHubで設定
-
https://github.com/${user}/${repo}/settings
を開く - GitHub Pages について
master branch /docs folder
をSave
4: 完了
-
https://${user}.github.io/${repo}/
にホスティングされている
Example
https://github.com/kuronat/home
→ https://kuronat.github.io/home/