The problem is that i am using github actions and vercel CLI to deploy my application. Due to problems on build in github i am not doing the build in Actions and i am sending the deploy directly to Vercel. But when i try to execute run: vercel deploy --token=${{ secrets.VERCEL_TOKEN }} there is no option to specify the branch i want the deploy to run on. So this command makes a preview of the last commit in main, instead of doing it on my branch feature/test-branch
What i am looking for is something like run: vercel deploy --token=${{ secrets.VERCEL_TOKEN }} --git-branch=${{ github.head_ref }} but the flag --git-branch does not exist on this command.
Any alternatives to this? or i am bound to building in github action first?
I haven’t tested this idea myself yet, but you may be able to accomplish something similar with GitHub actions. You’d need to checkout the relevant branch or commit before running the deployment step. If you give it a try, please let me know how it goes!