How do I deploy a static site (HTML/CSS/JS)

Hello I am replacing my current site (Gatsby) with just some static html pages and am not sure how to make it live.

When I checked it into my repo Netlify attempted to automatically run a build which failed and the new site did not go live.

Can someone please let me know how I can make it live?

Thank you

@swhinck You can either connect your Netlify site to the Github repository for those static files (if there is a repository), or you can ask that that site be disconnected from Github and drag-n-drop a folder with your static files in it on the Deploy page for that site in the Netlify dashboard.

Alternately, depending on how much you have invested in that previous version of your site (and how much work you want to do setting it up again), you can delete everything, create a new site on Netlify, and then drag-n-drop (or set it up with a repository.)

Hi, @swhinck. If the static files are in the repo and no build command is needed, be sure to delete the “Build command” setting. This will then just clone the repo and deploy those files without building.

Also, be sure to delete the “Publish directory” setting also if the files should be deployed directly from the base of the repo. If the files are in a subdirectory, then make that subdirectory the “publish directory”.

​Please let us know if that doesn’t work or if there are other questions about this.

Thank you that worked.

1 Like