-
Notifications
You must be signed in to change notification settings - Fork 1
Netlify 自動デプロイ設定
ゆうきゃん edited this page Feb 7, 2018
·
6 revisions
$ npm run dep
このコマンドで手動デプロイが行えますが、面倒ですよね? masterブランチにプッシュされたタイミングで自動的に最新の状態にデプロイする設定を行います。
https://app.netlify.com/account/sites
![2018-02-03 13 32 44](https://user-images.githubusercontent.com/35098175/35763191-ffe9d0f0-08e9-11e8-9c61-6c9fd75514ac.png)
New site from Git
から選択
![2018-02-03 13 33 02](https://user-images.githubusercontent.com/35098175/35763192-0011de2e-08ea-11e8-89c8-a9b3c124e375.png)
連携しているGitサービスを選択する。今回はGitHubを選択。
デプロイしたいリポジトリを選択する。今回は mixed-nuts を選択する。
![2018-02-03 13 34 38](https://user-images.githubusercontent.com/35098175/35763193-003bd0e4-08ea-11e8-8722-126d48a24027.png)
デプロイしたいリポジトリ、ブランチを選択する。
ビルドコマンド: npm run production
公開ディレクトリ: public/
Deploy site
ボタンを押下する。
![2018-02-03 13 36 32](https://user-images.githubusercontent.com/35098175/35763194-007929ee-08ea-11e8-8e33-7076c9ec4d2f.png)
Site deploy in progress
のデプロイ中のメッセージが消えるまでしばらく待つ。
![2018-02-03 14 09 36](https://user-images.githubusercontent.com/35098175/35763279-1272dc38-08ec-11e8-8ba7-1cbbbe0fb187.png)
URLが表示されたらデプロイ完了です。 アクセスして問題なければ自動デプロイの設定は完了です。
以降はmasterブランチにpushされるたびに自動デプロイされます。