ndimatteo / sanity-plugin-vercel-deploy

Custom plugin to trigger webhooks from your Sanity Studio.
MIT License
99 stars 20 forks source link

Deploy works with old cache #43

Open Cardoso-topdev opened 1 year ago

Cardoso-topdev commented 1 year ago

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

chrischabot commented 1 year ago

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

matt0rtega commented 1 year ago

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.

bybyers commented 12 months ago

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.