บทความนี้จะมาแนะนำการ public angular application ด้วย github-pages
อย่างง่ายๆ สามารถนำไปปรับใช้ได้กับ หลายๆ framwork ด้วยครับ
- สร้าง 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. รอสักครู่ ก็เสร็จเรียบร้อยครับง่ายมากและฟรีด้วย
ขอบคุณที่เข้ามาอ่านจนจบนะครับ ✌✌✌
Source Code : sampleweb.git