You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-29Lines changed: 23 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,14 +9,14 @@
9
9
10
10
Publish to any gh-pages branch on GitHub (or any other branch on any other remote).
11
11
Made for angular-cli users.
12
-
Made with Travis-CI in mind.
12
+
Made with Travis CI, CircleCi and Co. in mind.
13
13
Brought to you by the [angular.schule](https://angular.schule/) team!
14
14
15
15
## About
16
16
17
17
This command is similar to the old `github-pages:deploy` command of @angular/cli which was removed in [#4385](https://github.com/angular/angular-cli/pull/4385).
18
18
The [angular-cli-ghpages](https://github.com/angular-schule/angular-cli-ghpages) command is able to push to any branch on any repository. It's made on top of [tschaub/gh-pages](https://github.com/tschaub/gh-pages).
19
-
**This script works great on [Travis-CI](https://travis-ci.org/).** No git credentials must be set up in before. Specific environment variables of Travis-CI are evaluated, too. You will like it!
19
+
**This script works great on Travis CI and CircleCi.** No git credentials must be set up in before. Specific environment variables of Travis-CI are evaluated, too. You will like it!
20
20
21
21
## Changelog
22
22
@@ -27,49 +27,43 @@ A detailed changelog is available in the [releases](https://github.com/angular-s
27
27
28
28
This command has the following prerequisites:
29
29
30
-
- Node.js 4.x
30
+
-`Node.js 8.2.0` or higher which brings you `npm 5.2.0` which brings you [`npx`](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b)
31
31
- Git 1.7.6 or higher
32
32
-__optional__: Angular project created via [angular-cli](https://github.com/angular/angular-cli)
33
33
34
34
To install the command run the following:
35
35
36
36
```bash
37
-
npm i -g angular-cli-ghpages
37
+
npm i angular-cli-ghpages --save-dev
38
38
```
39
39
40
40
## Usage
41
41
42
-
Execute `angular-cli-ghpages` in order to deploy the project with a build from `dist` folder.
42
+
Execute `npx ngh` in order to deploy the project with a build from `dist` folder.
43
43
__Note: you have to create the `dist` folder in before (e.g. `ng build --prod`)__
44
44
45
45
Usage:
46
46
47
47
```bash
48
48
ng build --prod --base-href "https://USERNAME.github.io/REPOSITORY_NAME/"
49
-
angular-cli-ghpages [OPTIONS]
49
+
npx ngh [OPTIONS]
50
50
```
51
51
52
52
or
53
53
54
54
```bash
55
55
ng build --prod --base-href "/REPOSITORY_NAME/"
56
-
angular-cli-ghpages [OPTIONS]
56
+
npx ngh [OPTIONS]
57
57
```
58
58
59
59
or (`<base href="">` stays untouched)
60
60
61
61
```bash
62
62
ng build --prod
63
-
angular-cli-ghpages [OPTIONS]
63
+
npx ngh [OPTIONS]
64
64
```
65
65
66
-
there is also a shorter `ngh` command available
67
-
68
-
```bash
69
-
ng build --prod --base-href "https://USERNAME.github.io/REPOSITORY/"
70
-
ngh [OPTIONS]
71
-
```
72
-
If you want to push to `gh-pages` on the same repository with your default credentials, then just enter `ngh` without any options.
66
+
If you want to push to `gh-pages` on the same repository with your default credentials, then just enter `npx ngh` without any options.
73
67
74
68
75
69
### Usage with Angular CLI 6 or higher
@@ -79,7 +73,7 @@ Please take a look at the `dist` folder to see whether there is a subfolder with
79
73
If yes, you need to specify the deploy directory manually then when using this tool:
80
74
81
75
```bash
82
-
ngh --dir dist/[PROJECTNAME]
76
+
npx ngh --dir dist/[PROJECTNAME]
83
77
```
84
78
85
79
I most cases, the `[PROJECTNAME]` can be found in the `angular.json` file at `defaultProject`.
@@ -94,7 +88,7 @@ For your convenience, the command will recognize the [environment variable](http
94
88
In example, the following command runs [on our Travis-CI](https://travis-ci.org/angular-buch/book-monkey2):
0 commit comments