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
@@ -63,14 +64,12 @@ If you use the old syntax, you will probably receive the following error:
63
64
64
65
**[Everything GitHub: Continuous Integration, Deployment and Hosting for your Angular App](https://angular.schule/blog/2020-01-everything-github)**
65
66
66
-
67
-
68
67
## ⚠️ Prerequisites <aname="prerequisites"></a>
69
68
70
69
This command has the following prerequisites:
71
70
72
71
- Git 1.9 or higher (execute `git --version` to check your version)
73
-
- Angular project created via [Angular CLI](https://github.com/angular/angular-cli) v9.0.0 or greater (execute `ng update` to upgrade your project if necessary)
72
+
- Angular project created via [Angular CLI](https://github.com/angular/angular-cli) v9.0.0 or greater
74
73
- older Angular projects can still use the standalone program. See the documentation at [README_standalone](https://github.com/angular-schule/angular-cli-ghpages/blob/master/docs/README_standalone.md).
@@ -101,7 +100,7 @@ If you already have an existing Angular project on GitHub, skip step 1 and 2.
101
100
- Please enter the URL `https://github.com/<username>/<repositoryname>.git` into your browser – you should see your existing repository on GitHub.
102
101
- Please double-check that you have the necessary rights to make changes to the given project!
103
102
104
-
3. Add `angular-cli-ghpages` to your project.
103
+
3. Add `angular-cli-ghpages` to your project. For details, see the [installation section](#installation).
105
104
106
105
```sh
107
106
ng add angular-cli-ghpages
@@ -125,6 +124,24 @@ If you already have an existing Angular project on GitHub, skip step 1 and 2.
125
124
5. Your project should be available at `https://<username>.github.io/<repositoryname>`.
126
125
Learn more about GitHub pages on the [official website](https://pages.github.com/).
127
126
127
+
## ⚙️ Installation <aname="installation"></a>
128
+
129
+
`angular-cli-ghpages` can be installed via `ng add`.
130
+
This will install the NPM package and add the necessary `deploy` configuration to your `angular.json` file.
131
+
132
+
```sh
133
+
ng add angular-cli-ghpages
134
+
```
135
+
136
+
The `deploy` config will be added for the specified `defaultProject`.
137
+
If there is no `defaultProject` set and there is only one project in your workspace, this project will be used.
138
+
139
+
If you have multiple projects in one workspace, you can manually define the project name:
140
+
141
+
```sh
142
+
ng add angular-cli-ghpages --project MYPROJECTNAME
If you run this command from a CI/CD environment, the deployment will most likely not work out of the box.
@@ -157,7 +174,7 @@ ng deploy --repo=https://github.com/<username>/<repositoryname>.git --name="Your
157
174
>
158
175
> The `GITHUB_TOKEN` (installation access token) will only trigger a release of a new website if the action runs in a private repository. In a public repo, a commit is generated, but the site does not change. See this [GitHub Community post](https://github.community/t5/GitHub-Actions/Github-action-not-triggering-gh-pages-upon-push/m-p/26869) for more info. If your repo is public, you must still use the `GH_TOKEN` (personal access token).
0 commit comments