I use the deploy API to deploy my site with a zip file. I discovered today that apparently Netlify removes files and directories within the zip file that begin with a period.
This is problematic as my site has a “.well-known” directory, which used by a variety of Internet standards. This directory is included in the zip file that I send to the Netlify API, but it is not present when I download my deployed site from Netlify nor can I access any of the files within that directory in the browser.
The comment in that GitHub thread mentions that dot files are ignored except for .well-known; however, I’m not seeing the .well-known directory in the deployed site (these are the only dot files I have in my site that I care about).
The “workaround” of simply issuing a redirect is a hack and is not a satisfactory solution.
Indeed I have used both approaches in the past, but deploying a zip file through the API endpoint is the best solution for me: my git hoster is not supported by Netlify (so to use git deploy I would need to mirror to GitHub) and the netlify CLI command has a lot of dependencies and takes a long time to download. Since my site is deployed in a CI pipeline that starts from scratch each time, it’s much simpler and faster to simply install curl and zip and deploy the site that way.
I can use one of those two solutions as a temporary workaround, but I wanted to bring the issue of the disappearing dotfiles to the attention of Netlify in hopes of a fix. Hopefully since it’s already been addressed for git and CLI deploys, fixing it for the API should be straightforward.
I hate to be the “any status update” person but…any status update? I maintain a static site generator with built-in Netlify deployment (Statiq) and it uses the REST API with zip files to deploy sites. I’ve had reports from users the mirror this exact problem - they add a .well-known folder to the site, it gets generated and output as expected, but on deploying their site (as a zip file via the Netlify API) the .well-known folder is dropped. Thanks!