Shared Assets in a Monorepo setup

Great writeup, @tunjos, and welcome to our community!

Our deploys do indeed publish ONLY the publish directory you have configured (or the root of your repo / your base setting, if none is specified). So to publish “many directories”, they’d need to be subdirectories of your app and would need to be in the publish directory.

You could try something like this in your build pipeline that may help adjust the organization, but I suspect it would be a problem for other reasons - e.g. jekyll would reference the wrong paths for such assets in its generated html.

jekyll build && mv ../assets assets ...

I guess you could also deploy the shared assets in a 4th site and refer to them by name (https://othersite/assets/X) from every one of the 3 sites sharing access?

Finally, you could proxy between the sites - or proxy the assets folder between sites - to deploy only one copy of it. This could work with or without that 4th dedicated site I mention, and some guidance on that workflow (think of your “separate monorepo-built sites” here as being “separate repos” to see the direct application):

One more note - if you do end up copying the assets to each of your 3 sites’ publish directories as you build, this will not meaningfully impact your build times - we will not “re-upload” copies of unchanged files from a prior build EVEN ON ANOTHER SITE - so you won’t have to pay the time for uploading/processing repeatedly (just on first upload).