How to deploy site when js and html files are in different folders (reactjs)

my site builds and deploys correctly, but my index.html file is in a separate folder than my css and js files (my index.html file is in the ‘public’ folder, and my css and js files are in the ‘src’ folder).

Is there any way to link them? My program no longer run locally when I move them all into the same folder.

My site: https://an-highlation.netlify.app/
Git repository: https://github.com/CitrusCoding/RECIPIEBOOK/tree/main/recipebook
(Currently it is set up so that the publish directory is ‘public’, so the css and js files are not linked up)
It builds and runs correctly locally.

Can you share the repository you are deploying from?

Sorry, I should’ve linked it in the original post

The README.md that is part of the project gives you much of the details required to make a production version. Quote:

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

So what this is telling you is the production output is the build directory. This is the directory you need to set as the publish directory for Netlify. You can see more in the link provided above and in the Netlify Framework Integrations documentation for Create React App.

Also note the _redirects file needs to go into the public directory, not the root of the repository as it currently is.

ooooh, that makes sense, thank you!