Home > Enterprise >  Publishing angular app on github enterprise pages not working
Publishing angular app on github enterprise pages not working

Time:04-01

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

CodePudding user response:

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.

  • Related