LoginSignup
4
7

More than 5 years have passed since last update.

[要約] GitHubに静的サイトを公開する手順

Last updated at Posted at 2017-08-25

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 folderSave

4: 完了

  • https://${user}.github.io/${repo}/ にホスティングされている

Example

https://github.com/kuronat/home
https://kuronat.github.io/home/

4
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
7