Trouble deploying website

Hi, I am having some trouble deploying my site from a repository on github, as soon as I enter the website I get hit with a Page Not Found, I think the problem is in the Build settings configuration,
I’ve set the base directory as ./portfolio and the publish directory as ./portfolio/images everything else is empty
this is the website:
if you need to see my repo it’s called WebsitePortfolio, my account is Poitew

the github repository is structured like this:
—some images…
—some images…

Hi there,

Did you see this guide yet? This is the best place to start for “Page Not Found” issues.

If you are still seeing issues after following the troubleshooting steps in there, please check out this Support Guide as well. It outlines all of our build and deploy resources and will get you on the right track :slight_smile:

If none of the above resources help, please write back with your site name and what steps you have tried and we can look into this further!

Hi, I had already seen that guide but it didn’t help me, I’ve tried changing the publish directory and base directory multiple times, making some test, but it didn’t work every time, this is my website domain name

can you share a link to your repo?

there it is GitHub - Poitew/WebsitePortfolio: Responsive e-portfolio showcasing projects along with my skills; made with html, css and vanilla js.

@Poitew What do you have your Build Settings set to at the moment?

The values you mentioned in your first post are definitely incorrect based on the structure you outlined.

If you check the documentation you’ll see that the Publish directory is the folder that should contain your HTML & assets for deployment, and that it is relative to the Base directory.

Setting the Publish directory to deploy images would always be incorrect, as it would only deploy your image files and not your other files.

Setting the Publish directory to portfolio/images would also be incorrect if your Base directory was set to portfolio as that would be looking for portfolio/portfolio/images.

Considering that your file from /images/assets/portfolio.png has been deployed here:

My guess is that you’re still accidentally just deploying your images folder.

Since your site doesn’t appear to be actually performing a build, and is just static files, you could configure it a few ways.

  1. Don’t set a Base directory at all, leave it blank (the default is the root of the repository), then set your Publish directory to portfolio. This will perform no build at the root, then deploy all files in portfolio.


  1. Set your Base directory to portfolio, then leave your Publish directory blank (the default is the root of the Base directory). This will perform no build in portfolio then likewise deploy all files within it.
1 Like

Hi, first of all thank you for answering, however , both your answers are not working, maybe I’m just doing it wrong, here’s a screenshoot about my build settings:

I can only put one image per post so I put the Build settings I have right now

@Poitew Notice that you have the Package directory set to portfolio/ (something you never mentioned).

I also never told you to set the Package directory, you should clear that and leave it as its default too, (if you look closely you’ll see it even has a contextual note telling you not to set it unless it’s different from the base directory).

You’ve also got both the Base directory and Publish directory set in that screenshot, which doesn’t match my instructions either. You want one or the other, not both.

When I set the base directory to portfolio everything else becomes portfolio/, and It’s not letting me delete it.

@Poitew If that’s the case, then Netlify have changed something that I’m unaware of, I don’t actually use them myself anymore (I’m a former customer).

Try option #2, clear all the fields, set only the Publish directory as portfolio.

Unfortunately I’ve already tried, here is a screenshot of my build settings

@Poitew That should absolutely work, have you actually run a new “build”?

The site won’t be fixed by changing only those settings, you need to perform a build for them to take effect.

1 Like

I don’t think, how do you do that?

@Poitew Lots of ways, usually by pushing changed code to your repository, there’s documentation here:

There’s also a button in the Netlify UI that lets you rebuild the last commit, the documentation for that is here:

I’ve changed some code directly from github, and now the website work!
Thank you so much :melting_face:

@Poitew Great work, no problem at all, glad I could get you sorted out.