title: how to deploy Angular 2 App to Github Pages?
body: <p>I was able to publish an app made with Angular Cli tool to Github Pages a few weeks ago, but now when I try to use the command <code>ng github-pages: deploy</code> I get the error: <code>The specified command github-pages:deploy is invalid.</code>. This <a href="https://github.com/angular/angular-cli/pull/4385" rel="noreferrer">github thread</a> suggests that the command has been removed recently, and petersgiles recommended following these guidelines instead to publish pages: </p>
  
  <pre><code>1. npm install -g angular-cli-ghpages (doesn't work if its not global)
  2.Then in your package.json
  "scripts": { "deploy": "ng build -sm -ec -bh /repo name/ &amp; ngh --silent=false",...
  3.when you want to deploy npm run deploy
  </code></pre>
  
  <p>I followed these instructions, but got the error: <code>Failed at the mybiography@0.0.0 deploy script 'ng build -sm -ec -bh /aboutme/ &amp; ngh --silent=false'.</code> My npm and node js are up-to-date, and the error suggests that the problem is inside my <code>package.json</code> file. </p>
  
  <p>My terminal proceeds to render all five chunks of my program, but there's no link to follow to the website. Is there anything i can do to fix this? I completed my website, and just need somewhere to host it. I'm very lost as a beginner, so please point out any obvious mistakes or missing info.</p>
  
  <p>package.json</p>
  
  <pre><code>{
    "name": "aboutme",
    "version": "0.0.0",
    "license": "MIT",
    "angular-cli": {},
    "scripts": {
      "deploy": "ng build -sm -ec -bh /aboutme/ &amp; ngh --silent=false",
      "ng": "ng",
      "start": "ng serve",
      "test": "ng test",
      "pree2e": "webdriver-manager update --standalone false --gecko false",
      "e2e": "protractor"  },
    "private": true,
    "dependencies": {
      "@angular/common": "^2.3.1",
      "@angular/compiler": "^2.3.1",
      "@angular/core": "^2.3.1",
      "@angular/forms": "^2.3.1",
      "@angular/http": "^2.3.1",
      "@angular/platform-browser": "^2.3.1",
      "@angular/platform-browser-dynamic": "^2.3.1",
      "@angular/router": "^3.3.1",
      "core-js": "^2.4.1",
      "rxjs": "^5.0.1",
      "ts-helpers": "^1.1.1",
      "zone.js": "^0.7.2"
    },
    "devDependencies": {
      "@angular/cli": "^1.0.0-rc.1",
      "@angular/compiler-cli": "^2.3.1",
      "@types/jasmine": "2.5.38",
      "@types/node": "^6.0.42",
      "codelyzer": "~2.0.0-beta.1",
      "jasmine-core": "2.5.2",
      "jasmine-spec-reporter": "2.5.0",
      "karma": "1.2.0",
      "karma-chrome-launcher": "^2.0.0",
      "karma-cli": "^1.0.1",
      "karma-jasmine": "^1.0.2",
      "karma-remap-istanbul": "^0.2.1",
      "protractor": "~4.0.13",
      "ts-node": "1.2.1",
      "tslint": "^4.3.0",
      "typescript": "~2.0.3"
    }
  }
  </code></pre>