Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

236
Views
how to publish to github pages?

i am having trouble understanding some basic instructions on publishing to github pages. There is a new way to publish Angular projects made with Angular Cli; i am following directions from this page on the 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 (e.g. ng build --prod)

Usage:

ng build --prod --base-href "https://USERNAME.github.io/REPOSITORY/"
angular-cli-ghpages [OPTIONS]

I created a dist folder for my project, and then run the ng build code. The terminal shows all the chunks have rendered, but i cannot find a link to the github page. I look in my repository on github and it is as if nothing has happened. Is this because i need to cd into a specific folder to execute angular-cli-ghpages? Here is my repo, I would appreciate very much any help.

about 4 years ago · Santiago Trujillo
3 answers
Answer question

0

I was successfully able to push to github pages using 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 .

Steps i Did :

  1. Generated My SSH & Added it.

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

  1. Executed the push command.

enter image description here

Edit :

To Add more than one folders

Create folder parallel to assets, i created 2 folders Parth & Ghiya. Then added 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 & ghiya. Then executed the above push command as earlier.

about 4 years ago · Santiago Trujillo Report

0

The option to deploy to github via the angular cli was removed.

See this change

about 4 years ago · Santiago Trujillo Report

0

Try this (for mac) :

  1. $ npm install -g angular-cli-ghpages

  2. Push your code to a github repo and then run this in terminal: ng build --env=prod --base-href "https://yourgithubusername.github.io/yourprojectname/" here 'yourprojectname' is the name of your github repo, not your local repo.

  3. If everything works fine, then run : sudo angular-cli-ghpages and enter password.
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!