Auto publish from Gitlab not working

Hi there, I have a blog setup on Netlify and I use Gitlab cloud to host the repository. As far as I can tell I have everything setup correctly but my site won’t auto-publish when I commit to the repository. I know the setup is okay since manual publishing works fine. Is there some Gitlab setting that could disable the trigger for a deploy? Any suggestions would be appreciated.

Jason

Our automatic deploys are triggered by a webhook that we put in place when you link the repo via our UI, at GitLab. You should be able to see one pointing to the URL https://api.netlify.com/hooks/gitlab in your Repo’s Settings->Integrations page in the GitLab UI. If you do see it there:

image

…you can click into it (choose “Edit”) to see a history of sends and how our service responded. If you do see it there and there are some errors, try sharing them here!

If you don’t see it there, may be useful to re-link the repo by:

  1. selecting the ‘edit settings’ button from the repository settings card, which you can find at the top of the build & deploy settings page in our UI
  2. choosing ‘link to a different repository’ link that then appears
  3. linking to the same repo
  4. let us know how it goes!

Ugh, reconnecting it worked. I should have just tried that initially. Thanks!

1 Like

Hi guys. Have the same problem. re-linking repo didn’t work

this is on netlify side

on gitlab side:

Status Trigger URL Elapsed time Request time
204 Push Hook https://api.netlify.com/hooks/gitlab 0.09 sec just now

you are seeing a different problem @I_Seth - in your logs you see the line Canceled build due to no content change which is the issue - we don’t see any changes within your base directory since the last commit, so our system tries to “save you” some probably unneeded build minutes (cf [Support Guide] How can I optimize my Netlify build time?).

This of course is not helpful to you - you DO have changes you want to publish, I understand! To work around this “our build robots outsmarted themselves” situation (described in more detail here: File-based configuration | Netlify Docs), you can temporarily add a line (if you have an existing file) or section to your netlify.toml:

[build]
  ignore = "false"

or if you already have a default ([build] section, you can just add that ignore = "false" line to it. Do that for the first commit in any branch that shows the problem, until you can get a successful build, then you can remove it to allow the optimization to take back over.

1 Like

thank you very much for your help. working ok now!

1 Like