I deployed an app from GitHub to Vercel using one of those automatic ‘deploy’ buttons. I take that this creates a connection to my repo that is managed by Vercel, as opposed to the typical GitHub actions deployment setup.
My app doesn’t have authentication hooked up and it has functionality that can cost me money, so I don’t want to want it exposed to the public yet.
So I don’t want to deploy to production - just preview since that has some protection.
In my Vercel project’s git settings I can see that I should simply avoid pushing to ‘main’ in order to avoid production deployments.
But when I push to develop, instead of main, it is still deploying to production.
This tells Vercel not to deploy automatically when you push to the main branch. Any pushes to the production branch (e.g., “main”) create Production Deployments and pushes to other branches create Preview Deployments.
Yes, that spot in the project settings is where I focussed my attention. I had confirmed that my settings there are as expected and reviewed the linked docs. Your settings and docs are quite good. Appreciated.
I then made many changes to the project in my attempts to resolve the problem - to the point that anything I do there will no longer be reproducible. I will need to delete that project and re-create.
In the meantime I created a new project, making sure that it had both a main and a develop branch from the beginning. I created both a production and a preview deployment, deleted the production, and am now able to proceed with just the preview, as I wanted.
So, maybe I did something wrong with the first project? Not sure what. But I now do have things working as I want.