- Do you want to request a feature or report a bug?
bug
- What is the current behavior?
i have locked deploys. i publish using netlify deploy --prod. CLI tells me this:
Deploying to live site URL...
✔ Finished hashing 180 files✔ CDN requesting 81 files
😄 (72/82) Uploading client/app.0a6d7911.css..✔ Finished uploading 82 assets
✔ Deploy is live!
Logs: https://app.netlify.com/sites/scout-videos-51664/deploys/5d7e64a6fa03b8fb214cb84a
Unique Deploy URL: https://5d7e64a6fa03b8fb214cb84a--scout-videos-51664.netlify.com
Live URL: https://www.swyx.io
the last line is misleading, because what i just deployed is not live. we should not show that and prompt people to go and manually publish if they are sure they want to
I suspect this is likely an issue in the API rather than the CLI, as tracked in this internal-to-netlify-staff issue. If not it is anyway related so crosslinking them here :)
excellent thank you!
We can handle this in CLI. Will require additional fetches about current site information before deploys.
netlify api getSite -d '{"site_id": "your-site-id"}'

published_deploy.locked is the property
This should solve the trick.
https://github.com/netlify/cli/blob/master/src/commands/deploy.js#L145
const remoteSiteData = await api.deploy(siteId)
if(`prod` flag && remoteSiteData.published_deploy.locked) {
// exit early and show other console messgae
}
I just had a similair confusion. I have turned auto-publishing off, but still netlify deploy --prod gives me the Live URL as if it has published it, which it hadn't
This has been fixed in latest version
Most helpful comment
This should solve the trick.
https://github.com/netlify/cli/blob/master/src/commands/deploy.js#L145