amondnet / vercel-action

This action make a deployment with github actions instead of Vercel builder.
https://vercel.com/docs/cli
MIT License
619 stars 95 forks source link

Any way to use `vercel.json`? #225

Closed brycewray closed 1 year ago

brycewray commented 1 year ago

As the title says — is there a way to get this excellent GHA to “see” and respect a project’s top-level vercel.json file, such as to provide Cache-Control headers and so forth?

amondnet commented 1 year ago

@brycewray Just place vercel.json in your distribution directory.

https://github.com/amondnet/vercel-action/blob/master/example/angular/src/vercel.json https://github.com/amondnet/vercel-action/tree/master/example/nextjs https://github.com/amondnet/vercel-action/blob/master/example/static/vercel.json https://github.com/amondnet/vercel-action/blob/master/example/express-basic-auth/vercel.json

brycewray commented 1 year ago

@amondnet Had already tried without success. It’s a Hugo project that creates the distribution dir (public) on the fly. I suppose I could put it in the static dir and let Hugo copy it there. However, I’ve already found another way, by using a variation on the officially suggested method.

Thanks for the reply!