404 file not found error while publishing source for my GitHub Pages site

# 404

File not found

The site configured at this address does not contain the requested file.

If this is your site, make sure that the filename case matches the URL.
For root URLs (like http://example.com/ ) you must provide an index.html file.

I have pushed the entire project to the repo (master) and after that, I built the file using the following command:-
$ ng build --prod --base-href "https://GithubUserName.github.io/GithubRepoName/"

and then deployed to gh-pages using the following command:-
$ npx angular-cli-ghpages — dir=dist/Project-name

and after that when I visited the web link that was displayed in Github Pages it is showing the following error.

404

File not found

The site configured at this address does not contain the requested file.

If this is your site, make sure that the filename case matches the URL.
For root URLs (like http://example.com/ ) you must provide an index.html file.

Please help me.

1 Like

do you know how to create a GitHub Pages page from a repo? Because I just checked your profile, you don’t have the repo that you are trying to build, so check this out