ng コマンドに deploy
が追加されたので試してみれました。
I tried it because deploy
was added to the ng command.
リポジトリ作成 / Create Repository
プロジェクト作成 / Create Angular Project
angular-cli-ghpagesを追加 / add angular-cli-ghpages
"angular-cli-ghpages": "^0.6.0",
スクリプト追加 / add script
"build": "ng build --prod", "deploy": "ng deploy --base-href=/ng-deploy-sample/",
ng ビルド実行 / excute ng build
ng デプロイ実行 / excute ng deploy
ブランチ
デプロイコマンドが実行されると、 gh-pages
というブランチが作成されます。
When the deploy command is executed, a branch called gh-pages
is created.
リポジトリ設定 / repository setting
リポジトリ設定へ移動します。/ Navigate to repository settings.
GitHub Page
Sourceのプルダウンが、 gh-pages
branch になっていれば、公開されています。
If the Source pull-down is in the gh-pages
branch, it is open.
デプロイコマンドの結果 / Result of Deploy command
https://gurezo.github.io/ng-deploy-sample/
サンプルコード github.com