'why i cant deploy my application angular 12 in github pages?

I finished my angular application, and now I want to deploy it in github page, I run the following cmd:

  1. $npm i -g angular-cli-ghpages to install githup page.

  2. $ng build --prod --base-href="https://najib132.githup.io/appangular/"

  3. I created an appangular repository.

  4. $git remote add origin https://github.com/najib132/appangular.git

  5. $git push origin master

  6. $ngh

and when I enter on link it gives me 404 file not found



Solution 1:[1]

Try just commands:

ng add angular-cli-ghpages

ng deploy --repo=https://github.com/najib132/appangular.git

This is commands from angular-cli-ghpages documentation

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 izmaylovdev