Home
Support Forums

Deploying a site that isn't at the root of a repo

Sitename: reverent-beaver-83f3d0
Url: https://reverent-beaver-83f3d0.netlify.app/
Github repo: https://reverent-beaver-83f3d0.netlify.app/

Hello, to access to my static website I have to type : https://reverent-beaver-83f3d0.netlify.app/myblog/output/

because of my repo: https://github.com/Inerska/web_myblog.github.io

How to make https://reverent-beaver-83f3d0.netlify.app/myblog/output/ to https://reverent-beaver-83f3d0.netlify.app/

Please, thanks in advance.
Alexis…

Hey @Ergazia Welcome to Netlify Forums!

Could you please post your deploy log and your build settings in the Admin UI?

I’m assuming from your description that your publish directory is either not set or is incorrect:

I took a look at your repo and it looks like output should probably be the publish directory here… try adding to this to your deploy settings and deploy again.

Hope this helps :grinning:

Hey, thanks, I hope I didn’t transgress the forum rules.
Here is my build settings in my Admin UI


And that’s my deploy log :

6:58:39 PM: Build ready to start
6:58:41 PM: build-image version: 0582042f4fc261adc7bd8333f34884959c577302
6:58:41 PM: build-image tag: v3.7.6
6:58:41 PM: buildbot version: 46ee531a6ee957f94fb29adfde3b52177c7d5147
6:58:41 PM: Fetching cached dependencies
6:58:41 PM: Starting to download cache of 21.4MB
6:58:42 PM: Finished downloading cache in 847.961798ms
6:58:42 PM: Starting to extract cache
6:58:42 PM: Finished extracting cache in 169.68605ms
6:58:42 PM: Finished fetching cache in 1.022010696s
6:58:42 PM: Starting to prepare the repo for build
6:58:42 PM: Preparing Git Reference refs/heads/master
6:58:43 PM: Parsing package.json dependencies
6:58:44 PM: No build steps found, continuing to publishing
6:58:44 PM: Starting to deploy site from ‘/’
6:58:44 PM: Creating deploy tree
6:58:44 PM: Creating deploy upload records
6:58:44 PM: 15 new files to upload
6:58:44 PM: 0 new functions to upload
6:58:45 PM: Starting post processing
6:58:45 PM: Post processing - HTML
6:58:46 PM: Post processing - header rules
6:58:46 PM: Post processing - redirect rules
6:58:46 PM: Post processing done
6:58:46 PM: Site is live :sparkles:
6:58:46 PM: Finished processing build request in 5.343520096s

No… I don’t know what you think you might of done to do that :joy:

I think if you change your current base directory to your publish directory then Netlify should deploy output as the site itself… give that a try.

Should look something like this:

Base directory:                      Not set

Publish directory:                   MyBlog/output
2 Likes

Perfect! Thanks a lot, I prefer using Netlify than GitHub pages, just thanks to that !
Thanks a lot both of you, have a nice day.

1 Like

Hey back, I don’t want to create another topic for this simple question, but it seems that my last push on GitHub was not taken by Netlify, I mean, it recognized my last push, but the deployment isn’t the same.

How should I proceed?
Thanks in advance, Alexis.

Hi, @Ergazia. You have an input and output directory in this repo:

https://github.com/Inerska/web_myblog/tree/master/MyBlog/input
https://github.com/Inerska/web_myblog/tree/master/MyBlog/output

The publish directory appears to be correctly set at Netlify as MyBlog/output here:

https://app.netlify.com/sites/reverent-beaver-83f3d0/settings/deploys#build-settings

However, what I’m not seeing is a build command. The files in the input directory are in the cshtml file format which appears to use Microsoft’s Razor tool.

I don’t know Razor at all. The build systems at Netlify are running Ubuntu Linux. To build sites at Netlify you would need some way to invoke Razor on the command-line in Ubuntu. Again, as I don’t know Razor at all, I don’t know how to tell you do do that.

I do hope that is enough information assist you in some way. If there are other questions, please let us know.

1 Like

Before I push for a repo, I built it, and all the inputs become output.
But it looks like Netlify cannot take the last modification from the output folder in the last push.

Here is the documentation page about Deployment with Netlify:
https://statiq.dev/web/deployment/netlify

Hi, @Ergazia. I see the output directory completely deleted from the repo now.

With this change we will never see the contents of output because it is completely removed from the repo. This is reflected in recent build logs here:

2:47:48 PM: Failed during stage 'building site': Deploy directory 'MyBlog/output' does not exist

You also sent a link to documentation about Statiq but I don’t see how this relates to building a Razor site on the command line. Do you have documentation about how to do that?

Without a build command, this deployment isn’t going to succeed. This is why I’m focused on this question:

  • How does one build cshtml files on the command line using Razor on Ubuntu?

The site build I’m looking at haven’t used Statiq at all. If you are trying to deploy directly from Statiq instead, please let us know.