Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Publishing angular app on github enterprise pages not working

I recently built a simple angular app and decided to publish on enterprise github pages. I used the following method:

cd App
npm install
ng build --prod
cd ../app-github-pages-repo
cp -R ../App/dist/app/* .
git commit -m "Added the app"
git push

Within the github settings I see the message

Your site is published at https://host/pages/orgname/

But when I try to access it, it resources are not downloaded and page is not coming up

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You have missed setting base-href for your app. It is essential since your app is not hosted at the root of the domain.

You can try to build the app as follows:

ng build --prod --base-href https://host/pages/orgname/

make sure the base-href actually points to where the root of the sources are And follow rest of your steps.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading