Deploying organization repo to Vercel with a hobby plan

RMAG news

Requirements

https://gist.github.com/ky28059/1c9af929a9030105da8cf00006b50484

Since vercel doesn’t support deploying organization repository for free, here’s the workaround.

‘running vercel deployment with a hobby plan vercel project using vercel-actions’.

If you provide VERCEL_TOKEN, ORG_ID and PROJECT_ID, it links with the hobby plan and generate previews for you.

Module not found

There was module not found: Can’t resolve ‘@/components/…/Button’ error, and I found a related issue.

https://github.com/vercel/next.js/discussions/27666
One of them said ‘renaming folder to uppercase’ might cause trouble. git might not recognize case-sensetive changes by default.

I changed my filename ‘Button’ to ‘button’ and I checked my repo. It turned out the file name was still ‘button’, so I could see that git ignored the case-sentitive change.

Now that I see the problem. I had to set ignorecase to false manually by running git config –global core.ignorecase false. By default, a git template is set to ignore case.

https://stackoverflow.com/questions/10523849/how-do-you-change-the-capitalization-of-filenames-in-git

Resource not accessible by integration

While running preview command, I ran into another error. It actually turned out this command will write to my repo, so I need to give actions read and write permissions in settings.