iT邦幫忙

2017 iT 邦幫忙鐵人賽
DAY 30
0
Modern Web

Learning ASP.NET core + Angular2 系列 第 30

[Angular2] Deploy to 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


  • 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.

  1. 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


  1. Deploying the app via GitHub Pages

上一篇
[ASP.NET Core X Angular2] Server side rendering for SEO
下一篇
[Angular2] Deploy to Firebase (n' See ya !)
系列文
Learning ASP.NET core + Angular2 31
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言