Hello
I am using VS Code to create a simple create-react-app and trying to deploy to Netlify for the first time.
I have VS Code synced with GitHub’s desktop desktop app and I am pushing the folder to GitHub, which is authorised by Netlify and I can select the working folder no problem.
However, I realised Netlify needs a Build folder.
I can only select the whole repo from Netlify and If publish everything Netlify can’t find the build folder.
The only way I can get my site to publish is to manually drag the build folder into Netlify (and I did consider pushing only the build folder to Github) but both options mean I loose version control on my working folder.
Can anyone advise the right way to do this?
Thank you!
VS Code itself integrates well-enough with Git and GitHub. You don’t need GitHub app as such, but it’s a personal preference.
Do you have a site name? Maybe you’ve configured the base path incorrectly, which I’ve seen as a common practice.
Hi @hrishikesh thank you for your reply
Here is the link to my site (I have just reconnected connecting to GitHub rather than dragging the folder in manually)
https://scintillating-choux-09a5f9.netlify.app/
Is it as simple as setting the ‘base directory’ in build settings?
Thanks
Is this a React site? I’m assuming yes, because you’re talking about the build
folder. In that case, you’ve missed out on a few settings:
Change these:
to:
/
CI= npm run build
/build/
respectively.
The settings are found: Netlify App