Skip to content

Commit f3464a9

Browse files
committed
Add script to deploy the app to github.io
angular-schule/angular-cli-ghpages#37
1 parent efb4820 commit f3464a9

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,16 @@ Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protrac
2525
## Further help
2626

2727
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
28+
29+
## Deploy to github.io
30+
31+
* ng build --prod --base-href "/ng-fun-prog/"
32+
* ngh --no-silent --dir dist/ng-fun-prog
33+
34+
* Method 2
35+
* npm run deploy
36+
* yarn deploy
37+
38+
## Github.io URL
39+
40+
https://railsstudent.github.io/ng-fun-prog/

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"build": "ng build",
88
"test": "ng test",
99
"lint": "ng lint",
10-
"e2e": "ng e2e"
10+
"e2e": "ng e2e",
11+
"deploy":
12+
"ng build --prod --base-href \"/ng-fun-prog/\" && ngh --no-silent --dir dist/ng-fun-prog"
1113
},
1214
"private": true,
1315
"dependencies": {

0 commit comments

Comments
 (0)