How to post files to site but *not* to github repo?

If I’m deploying the site from a github repo, is there a way to deploy files in the public folder but not in the repo?

I’d like to host some PDFs on my site that are a too big/annoying to push to Github. Is there a way to avoid this?


Most people use git-lfs to handle large files, or store them in a file storage service like S3. Have you looked in to that? Also, how big are these PDF’s that you want to store?

Hi everyone,
I’m running into the exact same issue.
We really want certain files to be in our public folder but not in our github repo or anywhere else like S3.

I’m aware that one way to do this is, pulling the latest from the github repo, generate a dist (or whatever we would want in the public folder) and then add our desired files to that folder. But this isn’t user friendly at all and an automatic build from github would wipe this content.

Is there anyway this can be done? Thank you

Hey @anarodrigues,

Would it be practical to create a secondary ‘assets’ repository (which you could point to an domain) and host certain files here?

In fact, you could even drag-and-drop a secondary site to Netlify containing your certain files and reference it by!

Hi there,
Thanks for the quick reply!
Yeah that’s the solution I thought for future files. But wondering how to handle it when it is an existing file/old website that has later been converted to a github repo type of thing.

You could always copy the files/old website to a folder or new assets repository. Then, update the site and link the files to the folder or new assets repository. Then, remove/archive the old site? :+1: