Vercel logic of deployment

I'm using Vercel for the first time and I try to grasp the logic of deployment. So far, my deployment workflow was as follow (before Vercel): - I have a GitHub workflow triggering staging deployment after a release was created (from main); - I have a manual GitHub workflow that deploys the release to production. This way, I could test a release in a staging environment linked to a specific version before manually deploying it with a single click. I would have 2 domains, one for staging, one for production. With Vercel, I understand that by default any push to any branch will trigger a build in preview mode, unless it's on main, in that case it's automatically push to production. Firstly, does it mean the release process is totally irrelevant? Such as having version in package.json, a version tag and a release? Secondly, isn't it overkill to have a deployment everytime a push is made? I would rather only deploy when a PR is open on main (that's when the feature should be tested in a production-like environment) and for every push on main. Therefore, here is my approach: - I set the "Ignore Build Step" option to "Don't build anything" ; - I have two GH workflows: - One that build a preview version on PR on main or pushes on main - One that build a production version on manual trigger. Now the deployments are closer to what I want: having an up to date staging environment (preview mode) and a manually updated production. But I feel like I'm doing it wrong and there is something I don't get. I get Vercel — Canceled by Ignored Build Step in the CI checks result everywhere (because it still triggers a deployment that is cancelled) and I cannot have a domain pointing to the staging environment: it either has to be pointing to a specific build or to production. What am I missing? thinkies
1 Reply
Benjamin
Benjamin14mo ago
I also thought about having different branches but I want to keep it simple by having only a main branch which has a production ready code and everything is merged only via PRs.
Want results from more Discord servers?
Add your server