Deploy angular application to github-pages[Free]

Macus.y
Jul 9, 2022

--

บทความนี้จะมาแนะนำการ public angular application ด้วย github-pages
อย่างง่ายๆ สามารถนำไปปรับใช้ได้กับ หลายๆ framwork ด้วยครับ

  1. สร้าง angualr web application
ng new sampleweb

2. Create Github Repository

git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/pichayean/sampleweb.git
git push -u origin main

3. checkout new branch and build

git checkout -b gh-pages
ng build --output-path docs --base-href /sampleweb/

4. push all changes

git add .
git commit -m "public application"
git push --set-upstream origin gh-pages

5. setup github-pages at github repository follow this image

6. รอสักครู่ ก็เสร็จเรียบร้อยครับง่ายมากและฟรีด้วย

published
now website online!

ขอบคุณที่เข้ามาอ่านจนจบนะครับ ✌✌✌

Source Code : sampleweb.git

--

--

Macus.y
Macus.y

Written by Macus.y

“Many of life’s failures are people who did not realize how close they were to success when they gave up.”– Thomas A. Edison 😇😇😇

No responses yet