Skip to content

Commit 1c630e8

Browse files
filipesilvadond2clouds
authored andcommitted
docs(@angular/cli): add github pages deploy docs (angular#6326)
1 parent 602e9e6 commit 1c630e8

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

docs/documentation/stories.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@
2525
- [Code Coverage](stories/code-coverage)
2626
- [Application Environments](stories/application-environments)
2727
- [Autoprefixer Configuration](stories/autoprefixer)
28+
- [Deploy to GitHub Pages](stories/githug-pages)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Deploy to GitHub Pages
2+
3+
A simple way to deploy your Angular app is to use
4+
[GitHub Pages](https://help.github.com/articles/what-is-github-pages/).
5+
6+
The first step is to [create a GitHub account](https://github.com/join), and then
7+
[create a repository](https://help.github.com/articles/create-a-repo/) for your project.
8+
Make a note of the user name and project name in GitHub.
9+
10+
Then all you need to do is run `ng build --prod --output-path docs --base-href PROJECT_NAME`, where
11+
`PROJECT_NAME` is the name of your project in GitHub.
12+
Make a copy of `dist/index.html` and name it `dist/404.html`.
13+
14+
Commit your changes and push. On the GitHub project page, configure it to
15+
[publish from the docs folder](https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/#publishing-your-github-pages-site-from-a-docs-folder-on-your-master-branch).
16+
17+
And that's all you need to do! Now you can see your page at
18+
`https://USER_NAME.github.io/PROJECT_NAME/`.
19+
20+
You can also use [angular-cli-ghpages](https://github.com/angular-buch/angular-cli-ghpages), a full
21+
featured package that does this all this for you and has extra functionality.

0 commit comments

Comments
 (0)