Deploying via zip file using REST API issues

I am following the walk through on https://www.netlify.com/docs/api/#endpoints to upload a zip file to deploy. I send the following requets to netlify. (my ‘website.zip’ file contains a single ‘index.html’ file). I am in the same directory as zip file when I run the following command.

curl -H "Content-Type: application/zip" \
 -H "Authorization: Bearer xx-xxx-xxx" \
 --data-binary "@website.zip" \
 https://api.netlify.com/api/v1/sites/xxx-xxxx-xxx-xxxx/deploys

It goes through, and returns an object with the status, id, ect. However when I go into the admin UI, I see that my deploy failed. The message says ‘Deploy processing failed after 5 attempts’ and the log is below.

10:11:55 AM: Unpacking archive
10:11:56 AM: Unpacking archive
10:11:56 AM: Unpacking archive
10:11:56 AM: Unpacking archive
10:11:56 AM: Unpacking archive

I also tried an incorrect file location just for testing, and the UI then says ‘empty zip file’. Maybe this is the incorrect way to go about this. My entire mission is to let the user edit the html -> server builds a new zip archive with updated html -> use Netlify API to upload new zip file to production from server. Maybe I should be using the digest method instead? Any help or guidance is greatly appreciated!

Hi Garrett,

The zipfile seems to be corrupt. This is the internal error we receive:

Error extracting zip: Zip end of central directory signature not found

Please make sure you use only a zip program and not 7zip or anything else “fancy”. I would verify a zipfile on linux or dos or OSX (sorry, not sure how to do it on windows) by using something like:

unzip -t file.zip