Option to a pull a git repo, build and deploy


I see that we can only trigger a build with connected git repo and deploy. Or upload zip/files to deploy.

Is it possible to pull from a git repo, build and deploy via api?

Thank you

I’m not perfectly sure if I understand your question, but yeah you can deploy manually via CLI: Deploy in seconds with Netlify CLI | Netlify

Sorry, to be more clear:

  1. I create a site via api. (no git repo is connected)
  2. I want to trigger a build for that site using api. A git repo should be pulled, built and deployed as per netlify.toml config.

Oh, I see it now. Sadly no, that’s not possible. I can’t seem to think of any (hacky) way either to do this.

Okay. Probably, can we make this a feature request?

I can eliminate circle-ci completely from my stack.

Sure, maybe that will be possible one day, however to be honest, the chances seem very low as I haven’t seen many people request this kind of a workflow.

Can you detail your use case? Why is it not possible to create a repo and connect to it for CI? I see that you’ve mentioned Circle-CI already, but that doesn’t completely explain the use case (to me at least because I’m not familiar with it).

In short

  1. To reduce moving parts in my stack. (if I eliminate circle-ci, it’s one less api to deal with and I’m already paying for netlify.)
  2. To reduce the deployment time.

I figured out a hacky way to do it. I can use a temp site to mimick circle-ci and do my deployments.

Thanks for your time :slight_smile: