6

I am working on an ecommerce site with Next.js and want to deploy it to Vercel. I have seen that Vercel uses the Deploy-Preview-Ship model (DPS) and while I am not sure if this is something that goes against that I was wondering if there is a way to link GitHub actions/tags to my Vercel deployments so I can deploy each GitHub release, rather than each merge into the main branch. This way I can keep better semantic versioning and I can batch PRs and changes into releases. Any ideas or am I better off just deploying to production on each merge into main?

Max
  • 73
  • 3
  • 1
    There are some third-party actions on the [GitHub marketplace](https://github.com/marketplace?query=vercel) that you can use on [release](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#release). Here is an example: https://www.eliostruyf.com/deploy-site-vercel-github-actions-releases/ If you want to keep using the official bot, then you can do a workaround - create two branches - one for dev, another for prod. Don't merge anything on prod until you are ready to release. However I believe that the actions will also work fine, as they also use the same Vercel APIs. – brc-dd Aug 18 '21 at 07:15

0 Answers0