Can't deploy anymore due to "base directory does not exist" error, despite directory existing

Hi, I’m super new to web dev stuff, netlify, and even coding in general. I made a Hugo website using R blogdown, and it was working well at first. The custom and primary domain is [redacted] and the default domain is [redacted]. The other day I accidentally used the code
blogdown::build_site()
while I was making changes to the site, and I think this started my issues, though I’m not 100% sure.

Yesterday I got an error message from Google Search Console, saying there was an issue with the id in some URLs on my site. I went to the site to check, and found that when I click on either of the two posts I have, it redirects to https:// deploy-preview-15–[redacted]netlify.app/posts/[redacted]/, rather than the url https://www.[redacted]. (it does this for both posts). Note, however, that the correct url still works if typed in manually. I don’t know why this is happening, though I did read a netlify support post on deploy previews. I also found this post which seemed like a similar issue, so I tried to clear the cache and redeploy the site. That gave me a “base directory does not exist” error message.


I’m very confused, because I didn’t delete that github repo, it still exists (https://www.github.com/[redacted]). I tried searching for others who had this issue, but none of those posts seemed relevant to this issue (for example, another person didn’t actually have their directory on github). I have tried redeploying multiple times and keep getting the same issue.

Any help would be appreciated. I would like to fix the issue of the deploy preview showing up on my site for those two blog posts, and I would also like to be able to redeploy my site. I’m totally out of my element here, and really lost.

Minor update: I did find that while my github repo exists, https://github.com/[redacrted]/public does not exist, and this is apparently the “publish directory.” I’m not sure what to make of this or how to fix it. Deleting the publish directory link in settings did not solve the issue, not that I expected that to work. I guess that url doesn’t work because the deploy is failing.

Update 2: I made a new github repo with the exact same files and set that as the repo for netlify to pull from, and that ended up working for whatever reason.