Angular Angular-CLI Build Deploy Github-pages
▌Introduction
Github Pages is a quick and popular website hosting service
for the Github repositories. We are going to deploy our website to Github
Pages with Angular CLI.
▌Environment
l Node: 6.4.0
l Angular CLI
1.0.0-beta.19.3
▌How to Deploy
▋Create Github Repository
Of course we should have a Github repository and push our
project codes.
▋Build and Deploy
You can quickly deploy the website in Angular CLI by this
command.
$> ng github-pages:deploy --message
"Commit message"
|
The command will create a new branch: gh-pages, which
will store the build output files.
But before your deploy, notice that
1.
The project’s name should as same as the name of the
Github repository.
2.
We have to commit and push current changes on the project
codes.
After
successfully deploying the project, now we can browse it on
{Github_id}.github.io/{repository_name}
▌Reference
沒有留言:
張貼留言