1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

作成したホームページをGitpagesで公開してみた

Posted at

未来電子テクノロジーでインターンをしている<@y_mishima_miraidenshi>です。
未来電子のプログラミングコースの学習として、自己PRホームページを作成しました。
その際、作成したホームページを公開するまでの手順を忘れないために記録しておこうと思います。プログラミング初心者であるため、内容に誤りがあるかもしれません。
もし、誤りがあれば修正するのでどんどん指摘してください。

Gitpagesでの公開手順

1.Githubのアカウント登録

Gitpagesで公開するにはGithubのアカウントが必要になります。
まずはアカウントを取得します。

2.WEBページの作成

ローカル環境(自分のPC)で公開するホームページを作成します。

3.新しいレポジトリを作成

自分のGithubのマイページにて、新しいレポジトリを作成します。
画面右上のNew repositoryから作成できます。
レポジトリ名は自由に指定できます。
レポジトリ.png

4.レポジトリをクローンする

作成したレポジトリをローカルにクローンします。
ターミナルにて以下のコードによってクローンし、そこへディレクトリを移動します。
$ git clone git@github.com:username/repositoryname.git

usernameには自分Githubアカウントの名前を、repositorynameには先ほど作成したレポジトリの名前を入れます。

5.ファイルのコピー

クローンしたファイルに作成したホームページの中身をコピペします。

6.addしてcommitしてpush!

以下のコードを入力して、ファイルをpushします。

$ git add .
$ git commit -m “commit”
$ git push origin master

7.ソースの設定

作成したレポジトリにてSettinngを開きます。
ソース.png

下の方にあるGithub PagesのSource欄にて、None→master branchに変更します。
変更後しばらく経つと、ホームページが公開されるURLが表示されます。
URL.png

まとめ

以上、ホームページをGitpagesで公開する手順でした。
今後も成果物を公開する機会を増やせればいいなと思います。

1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?