Создайте новый репозиторий с именем :
Repo Name : USERNAME.github.io
// example
Repo Name : manthanank.github.io
Клонирование репозитория в редактор кода
git clone https://github.com/<username>/<username>.github.io.git
// example
git clone https://github.com/manthanank/manthanank.github.io.git
Перейдите к проекту с помощью cd
cd project-name/
// example
cd manthanank.github.io
Убедитесь, что angular установлен, если нет
npm i -g @angular/cli
Создайте приложение angular с помощью команды cli
ng new project-name --directory ./
// example
ng new angular-app --directory ./
Перейти к коду
code .
Далее перейдите в angular.json
и внесите изменения в файл
"outputpath": "dist/angular-app" => "outputpath": "any-name"
// example
"outputpath": "docs"
Собрать проект
npm run build
Внесите изменения в GitHub :
git add .
git commit -m "Initial commit"
git push
Перейдите в репозиторий в браузере и обновите его, изменения отразятся в репозитории
Далее щелкните на Repository Setting ⇒ Pages ⇒ In Source change folder и сохраните.
/root => /docs
Через несколько секунд ваш сайт будет запущен:
Your site is pubished at https://username.github.io
// example
[https://manthanank.github.io](https://manthanank.github.io)
Ссылка :
https://github.com/angular-schule/angular-cli-ghpages