How to publish on github pages?

I'm having trouble understanding some basic publishing instructions on github pages. There is a new way to publish Angular projects made using Angular Cli; I follow the directions on this page for a new command, angular-cli-ghpages :

 Execute angular-cli-ghpages in order to deploy the project with a build from dist folder. Note: you have to create the dist folder in before (eg ng build --prod) Usage: ng build --prod --base-href "https://USERNAME.imtqy.com/REPOSITORY/" angular-cli-ghpages [OPTIONS] 

I created a dist folder for my project and then ran the ng build code. The terminal shows all processed fragments, but I can not find the link to the github page. I look at my repository on github and it is as if nothing had happened. Is it because I need to write cd to a specific folder to execute angular-cli-ghpages? Here is my repo , I would really appreciate any help.

+5
source share
2 answers

I was able to successfully click on github pages using the command

 angular-cli-ghpages --repo=https://github.com/parthghiya/testrepo.git --name=parthghiya --email=parth.ghiya@knowarth.com --no-silent 

Repo link: https://github.com/parthghiya/testrepo

I did ng build --prod --base href .

The steps I took:

  • Generated my SSH and added it.

https://help.github.com/articles/connecting-to-github-with-ssh/

  1. The push command is executed.

enter image description here

Edit:

To add multiple folders

Create a folder parallel to the resources, I created 2 folders Parth and Ghiya. Then added the following entry in angular-cli.json

 "assets": [ "assets","parth","ghiya", "favicon.ico", "manifest.json" ], 

So, the dist folder now contains 3 folders, now assets, parth and ghiya. Then I executed the above push command as before.

+4
source

Removed option for deployment to github using angular cli.

See this change

+2
source

Source: https://habr.com/ru/post/1267170/


All Articles