Image Image Image Image Image
Scroll to Top

To Top

General

19

Aug
2019

inGeneral

vonJohannes Hoppe

angular-cli-ghpages@next

On 19, Aug 2019 | inGeneral | vonJohannes Hoppe

I’m very excited to announce angular-cli-ghpages@next.
You can now easily deploy your Angular app to GitHub pages. Here is a quick start, that shows how you can publish you app within minutes.

Quick Start

This quick start assumes that you are starting from scratch. If you already have an existing Angular project on GitHub, skip step 1 and 2.

  1. Install the next version of the Angular CLI (v8.3.0-next.0 or greater) globally and create a new Angular project.

    npm install -g @angular/cli@next
    ng new your-angular-project --defaults
    cd your-angular-project
  2. By default the Angular CLI initializes a Git repository for you. To add a new remote for GitHub, use the git remote add command:

    git remote add origin https://USERNAME.github.io/REPOSITORYNAME.git
  3. Add angular-cli-ghpages to your project.

    ng add angular-cli-ghpages
  4. Deploy your project to GitHub pages with all default settings. Your project will be automatically built in production mode.

    ng deploy

    Which is the same as:

    ng run your-angular-project:deploy

  5. That's it! Your project should be available at https://USERNAME.github.io/REPOSITORYNAME.

Learn more at:
https://github.com/angular-schule/angular-cli-ghpages