Help with the API regarding deploys

Hey!

So quick question about the API: I’m attempting to deploy a site which requires a command to be run in order to be built. I uploaded the zip file and netlify unpacks it correctly. The zip file contains a netlify.toml file where the build command and the deploy directory is stated. What command and args should I give the API in order to build with those arguments?

The TOML is:

[build]
  command = "yarn run generate"
  publish = "dist"

Thanks!

While this is a great question it is also not possible.

For the manual deployment method no build command is run. The uploaded files are deployed as-is.

For a build process/command to be run, our continuous deployment is required.

1 Like

Hi @aguilaair,

Do you mind sharing the code you used to get the zip file to upload and unpack? I have gotten the file digest to working, but wanted to test out the zip file upload as well. I cannot figure out how to get it working. It just tries to unpack the zip file 5 times and then fails.

Thanks!

1 Like

Hi @garrettbland, we have an example in our docs. However, we recommend deploying via the digest method because then we’ll ONLY upload the changed files. When you do a zip upload then you have to upload every file included in the deploy.

1 Like

Thanks @futuregerald! I’m still trying to wrap my head around the digest method completely and netlifys build process. So for example, lets say I have a simple website with the following files.

index.html
about.html
contact.html

I make a change to the about.html file. So the next step is to create a new deploy with just that single file being required? Or do I still need to make sure all three files are required, but then only have to upload that single file with the new SHA1 hash?