0

I want to deploy a clone of this Virtual Art Gallery project to GitHub Pages.

However, I'm only able to deploy the base html site rather than the build site which shows a 404 page on GitHub.

Steps I've taken:

Created a GitHub Pages site at USER.github.io and added the code below to the package.json:

"predeploy": "npm run build",
"deploy": "gh-pages -d build",

In another run I created a new repo USER.github.io/REPO and added the code below to package.json:

"homepage": "https://USER.github.io/REPO",
...
"predeploy": "npm run build",
"deploy": "gh-pages -d build",

I've installed gh-pages and ran npm start, npm run build, npm run deploy.

In some attemps, deploy returned Error: ENOENT: no such file or directory, stat 'directory/BUILD' but I fixed this by running npm start first.

nr1
  • 93
  • 10
  • Probably you need to configure the [source folder](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-from-a-branch) in your Pages configuration – Andrii Bodnar Dec 04 '22 at 10:36

0 Answers0