title: deploy angular 2 app to github pages - failed
body: <p>I've been trying to deploy my angular 2 app to github pages so I can view the app on the hosted github link but no luck so far. </p>
  
  <p>As soon as I finished my app, I ran these commands:</p>
  
  <pre><code>ng build --prod
  
  git remote add origin "My REPO"
  git commit -a
  git push -u origin master
  </code></pre>
  
  <p>I then tried to running on terminal</p>
  
  <pre><code>ng github-pages:deploy
  </code></pre>
  
  <p>and got this error:</p>
  
  <pre><code>The specified command github-pages:deploy is invalid. For available options, see `ng help`.
  </code></pre>
  
  <p>After researching I ran across this page and followed the instructions: <a href="https://www.npmjs.com/package/angular-cli-github-pages" rel="noreferrer">https://www.npmjs.com/package/angular-cli-github-pages</a></p>
  
  <p>I installed angular-cli-github-pages via npm on my project directory:</p>
  
  <pre><code>npm install --save-dev angular-cli-github-pages
  </code></pre>
  
  <p>it says I have to create the gh-pages so I ran this command below:</p>
  
  <pre><code>git checkout --orphan gh-pages
  </code></pre>
  
  <p>and then committed the files and pushed the changes and returned back to the origin master and ran the deploy command and it gave me the same error:</p>
  
  <pre><code>  The specified command github-pages:deploy is invalid. For available options, see `ng help`.
  </code></pre>
  
  <p>I've been going back and forth with different methods and it's not working. Can someone please point what I should do to properly deploy this to github pages?</p>