sanity-plugin-vercel-deploy icon indicating copy to clipboard operation
sanity-plugin-vercel-deploy copied to clipboard

Deploy works with old cache

Open Cardoso-topdev opened this issue 2 years ago • 3 comments

When I click on the Deploy button on the Sanity Deploy tab, the deploy launch with the old cache. If I redeploy it without the existing Build Cache(by unchecking the checkbox), it works well, but it doesn't work if I click on the Deploy button on Sanity. Is there a way to deploy without the old cache? image

Cardoso-topdev avatar Jun 01 '23 05:06 Cardoso-topdev

In case anyone else runs into this issue: You can disable the build cache by adding ?buildCache=false to the deploy webhook URL

https://vercel.com/docs/deployments/deploy-hooks

chrischabot avatar Aug 22 '23 05:08 chrischabot

Also experience this. In order to deploy correctly I have to go into the terminal locally, run yarn build, and publish the updated .vercel/output/static/index.html. It seems like that file is not being regenerated and the cached one is being used.

@chrischabot I set ?buildCache=false&forceNew=true but it still didn't work.

matt0rtega avatar Sep 27 '23 11:09 matt0rtega

I was able to add ?buildCache=false to my deploy hook in Sanity. I also added the updated deploy hook to Vercel which I think was what did the trick.

byebyers avatar Nov 16 '23 01:11 byebyers