Hi,
Something wrong with deployment from zip file. It doesn’t show any error but It’s not building functions folder. When I open site, its not found. Site id is 924e8873-808a-48fe-9999-bbc3d676e04a. Do you have any idea?
Zip folder structure:
/build
/functions
/package.json
/netlify.toml
Hi, this thread didn’t help me. I tried zip project putting it in one folder before zipping and tried to just send project files to zipped folder. In either way, when I deploy it using API, it’s being built too fast, no error message, and the site doesn’t work.
Building logs
3:50:56 PM: Creating deploy upload records
3:50:56 PM: Unpacking archive
3:50:57 PM: Starting post processing
3:50:57 PM: Post processing - HTML
3:50:57 PM: Post processing - header rules
3:50:57 PM: Post processing - redirect rules
3:50:57 PM: Post processing done
3:50:57 PM: Site is live
A deploy from a zip file will enter post-processing mode straight after being created.
Thus, this won’t bundle the functions. It’s only useful to deploy fully static websites.
However, you can use file digest method:
But it’s more complicated than use a Git repo as you’d have to bundle the functions yourself, generate a SHA1 for each, add that to deploy request first and then send the actual file.
Additionally, you can simply use Netlify CLI to deploy as it will manage all this in one command.
I don’t see the point in doing this. Even if it works, you won’t get any Git-based features like auto-deploy on push, PR commit checks, and anything of that sort as Netlify needs to be able to access the repo with the app installed. So basically, this would only be useful if you trigger the builds from the UI or via build hook, which might not be what you’re looking for.
I am creating CMS that users deploys on their netlify account from landing page. I need that the user would be able to update his CMS when there is an update in CMS repository. I tried a way of deploying zip using API, but we figured out that it won’t work.
The only way this would work is if you can allow the users to have their own account or something on your website. I have seen many people use Netlify to deploy some kind of site builders or custom websites for clients which they connect to a single repo and deploy changes to that, which updates it for all their clients.
The approach you’re taking won’t work. There are still a few ways you could get this to work, though not quite automatic:
You can allow your users to use your repo as a Git submodule.
You can distribute your code as a library or something.
In both these cases, you’d have to ask the users to update it manually. There might be more ways to get this done, but the approach discussed above won’t work.