Deploy badge reads "No deploys"

Hi! I am using a status badge:

Deploy status badge
This image automatically updates to reflect the current state of your latest production deploy.

The status badge documentation lists 3 possible statuses:

  • Success
  • Building
  • Failed

However I am seeing a different status (“No Deploys”): 68747470733a2f2f6170692e6e65746c6966792e636f6d2f6170692f76312f6261646765732f31363931376634652d656663

I believe the problem is because I am not using Netlify builds, I am instead using the Netlify API (through nwtgck/actions-netlify) to deploy a dist built in my GitHub pipeline. If I look in the “Deploys” tab of my site I do see deploys listed and I do see a Published deploy.

My question is: do these badges actually refer to the deployment of builds instead of deploys? Are they compatible with deploys via the API?

Note: I am posting this publicly rather than contacting support because I haven’t been able to find this information anywhere online so this thread may help other people who encounter this!

Thank you!

Hi, @shrink, manual deploys should result in a “Success” badge also. So, yes, it should work the same for manual deploy sites.

What is the URL for the badge image? For example, here is an example of manual deploy badge image:

https://api.netlify.com/api/v1/badges/0cecb330-93fc-4e33-af4c-b243aa75f20f/deploy-status

If you prefer, would you please send us the site API ID (which is 0cecb330-93fc-4e33-af4c-b243aa75f20f in the URL above) for the site which isn’t working?

Thank you, it’s good to hear that it should be working: I wonder if I have misconfigured my site then, perhaps there’s some combination of settings that is causing this. The site ID is 16917f4e-efc3-4dc9-ba27-f9656b07c1f4 :slight_smile:

Hey @shrink,
I’ve filed a bug for this for our backend team to take a look at! I can’t say if/when that will prioritized though so maybe we can find a workaround? Looking at the tool you’re using to deploy, maybe flipping one of the optional inputs will help our system pick it up, i.e. maybe setting production-deploy to true (the default is false). Let us know if that works for you!

Thank you very much for looking into it! I just wrote a long reply pondering possible parameter choices and as I was about to hit send I spotted the issue. I must have misconfigured my site at some point: “Activate builds” was turned on with a “Production branch” value that does not exist in the repository. I expected that if I make a production deploy via the API then the badge would read “success” if that deploy succeeded, I hadn’t considered what else could influence that badge.

I think the bug is that when builds are turned on then the badge will always report the status of the “Production branch”, even if there have been production deploys made successfully via the API. The description of the badge is “latest production deploy” but it behaves as “latest production deploy [from production branch if builds are on OR from the API if builds are off].”

Steps to reproduce:

  1. “Activate builds”
  2. Set “Production branch” value to “branch_does_not_exist
  3. Deploy to production via the API

The badge will now read “No deploys” even though your deploy to production has succeeded. I think this (just about) qualifies as a bug but it’s caused by bad site configuration that I can change to ensure the badge works for my use-case: I’m only using the API to deploy.

Hopefully if anybody else encounters this issue they’ll be able to make the same configuration change – seems unlikely someone would need to have builds enabled but only deploy to production via the API!

Thank you for your help, much appreciated :slight_smile:

1 Like

Hey @shrink ,

I use the same setup as you via nwtgck/actions-netlify and having the same issue with the badge showing “No deploys”.

I’m still confused though what was your solution? What is the required configuration change?

UPDATE:

So it seems you now MUST authorize and link Netlify to your Git repository, so you can then access the Build settings and choose between Active Builds and Stopped Builds.

It DOES NOT appear to work with Manual Deploys anymore.

It appears to be quite a recent change on their part because I can see some of my other badges stopped working as well, even though I was directly using the Netlify CLI for deployments in that case.

My only concern is that I’m not even sure whether the badge is accurate now, it’s showing “Success” but is it taking the last result from the Netlify’s own active build (when first linking the repo it does one) or ANY published deploy.

Conclusion: seems like the badge is tightly coupled to Netlify’s own builder now, which is kind of disappointing.

Wonder if @luke knows more?

@luke , are you able to shed some light on the above?

It also appears that your own link is now displaying “no deploys”.

Confirmed that badges do NOT work with any other deploys other than it’s own Netlify build.

I’ve intentionally failed the Netlify build, then performed a successful build via Actions / CLI, the badge is still showing “Failure”.

Screenshot:

Very very disappointing.

Hi, @braincomb. The status badge feature is intended only for builds at Netlify. They only work correctly with the build and deploy process here.

They do not work with the manual deploy process (which is what is being used when a GitHub action is used to deploy).

Thanks everybody for posting to this thread. Spent an hour debugging this myself. This is a minor issue but the documentation chat bot still thinks that this badge does work for manual deploys. Totally understand why you think this is a build status for your own build system pipeline but not why the API for setting the build status via netlify api doesn’t appear to be available.

One thing why this use case is important to some folks is that we can’t give you access to our repository due to compliance requirements. The public release process is happening in the repository, so can only release materials that have been approved for public release if that makes sense.

How can I help you today?

Do deploy badges work with manual deploys?

Yes, deploy badges work with manual deploys. The deploy status badge automatically updates to show the status of a site’s most recent production or branch deploy, regardless of whether the deploy was triggered manually or through continuous integration.

To add a status badge to your repository README, documentation, or any other web page, follow these steps:

  1. In the Netlify UI, select a specific site, then go to Site configuration > General > Status badges.
  2. Copy the automatically generated markdown snippet and paste it into your repository README or markdown source for any website.
  3. Optionally, to create a status badge for a deployed branch, add the ?branch= query parameter to the badge image URL. For example, if the branch name is dev, the image URL would end with /deploy-status?branch=dev.
  4. Commit the changes to your README or deploy the website containing the markdown snippet.

When a user encounters the status badge in your README or website, the badge will reflect the current status of your site’s most recent production or branch deploy. Selecting the status badge takes a user to your site’s Deploys page.

For more information, you can refer to the Netlify documentation on status badges.