Deploying Angular App
On GitHub Pages

Deploying Angular App On GitHub Pages

Show your Angular App to the world for FREE Using GitHub Pages in 4 Easy Steps.

#1 Create a Repository

Create a Public GitHub Repository for your Angular App (You need to create a GitHub account first).

No alt text provided for this image


#2 Make a note of your "Owner Name" and "Repository Name" in GitHub.

No alt text provided for this image


#3 Run this command in the terminal of your Project

ng build --prod --output-path docs --base-href https://<owner-

name>.github.io/<repo-name>/

For the previous example my command will be:

ng build --prod --output-path docs --base-href 

https://YoussefZidan.github.io/Repo-Name/

You will see a Docs Folder has been created inside your App Folder:

No alt text provided for this image


Make a copy of the index.html and rename it 404.html then Push this folder (Docs Folder) to the created Repository

#4 change GitHub pages to the master branch/docs folder.

No alt text provided for this image


Now wait a few minutes and you will see your app published in a URL like this:

https://youssefzidan.github.io/youtube-api

بعد اذن حضرتك انا جربت و الريبو اترفعت بس مفيش كونكشن مع الداتا بيز "فاير بيز" .. فكنت عايز اسأل هو الطريقة دي عشان الفرونت بس ولا دي مشكلة في الكود و شكرا جدا لحضرتك

Like
Reply

بعد اذن حضرتك انا فى الخطوة التالتة طلعلى ايرور بسبب انى مستخدم مكتبه على الرغم انى عاملها import in app module و كله شغال مظبوط فى development ولكن كانه مش شايفها .. ممكن تكون ابه المشكلة ؟

Like
Reply

To view or add a comment, sign in

More articles by Youssef Zidan

Explore content categories