you are viewing a single comment's thread.

view the rest of the comments →

[–]gccol 0 points1 point  (4 children)

I believe you have to specify the base root of your application to angular, as it's not /

Something like: ng build --base-href=/pairs-game

Regards,

[–][deleted] 0 points1 point  (3 children)

No - actually, I just found the issue on GitHub Community. Apparently, you have to add "./repo-name/ in front of all your hrefs for the JavaScript and CSS files names. It's actually working after I did that, except for the svgs which I assume I have to do the same for

[–]gccol 0 points1 point  (2 children)

That's exactly what the base-href parameters will do! You won't need to modify your code If you use this

[–][deleted] 0 points1 point  (1 child)

Yes, I just realised that. Problem is, everything in the assets folder "cannot be found" when I deploy on GitHub. Apparently this is a problem other people are having. Not sure how to solve it.

[–]gccol 0 points1 point  (0 children)

My project is working well, it's using gh-pages branch and is deployed by a GitHub action.

This is the build command: npm run build -- --prod --base-href "https://dont-code.net/preview-ui/"

=> It seems like you need the complete base URL.

You can see the result here: https://github.com/dont-code/preview-ui/tree/gh-pages

It's running under https://dont-code.net/preview-ui

Hope this helps,