---
title: Can you deploy based on tags/releases on Vercel?
description: Learn how to deploy based on tags/releases on Vercel.
url: /kb/guide/can-you-deploy-based-on-tags-releases-on-vercel
canonical_url: "https://vercel.com/kb/guide/can-you-deploy-based-on-tags-releases-on-vercel"
published: 2025-11-03
last_updated: 2025-11-10
authors: Lee Robinson
related:
  - /docs/concepts/projects/project-configuration/git-configuration
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---
<!-- docsgraph:related -->
## Related pages

> **For AI agents:** Follow these links to understand how this page connects to the rest of the Vercel ecosystem. For the full cross-link map (inbound, outbound, prerequisites, and semantic neighbors), see the .graph.md link below.

- [Deploying Git Repositories with Vercel](https://vercel.com/docs/git?from=related&source_path=%2Fkb%2Fguide%2Fcan-you-deploy-based-on-tags-releases-on-vercel&source_site=vercel-kb&relationship=related) — Vercel automatically deploys supported Git repositories on every branch push and when changes merge into the production
- [Deploying to Vercel](https://vercel.com/docs/deployments?from=related&source_path=%2Fkb%2Fguide%2Fcan-you-deploy-based-on-tags-releases-on-vercel&source_site=vercel-kb&relationship=related) — Learn how to create and manage deployments on Vercel.
- [Deploying a project from the CLI](https://vercel.com/docs/projects/deploy-from-cli?from=related&source_path=%2Fkb%2Fguide%2Fcan-you-deploy-based-on-tags-releases-on-vercel&source_site=vercel-kb&relationship=related) — Set up and deploy a Vercel project using the CLI, from linking to production.
- [Managing Deployments](https://vercel.com/docs/deployments/managing-deployments?from=related&source_path=%2Fkb%2Fguide%2Fcan-you-deploy-based-on-tags-releases-on-vercel&source_site=vercel-kb&relationship=related) — Learn how to manage your current and previously deployed projects to Vercel through the dashboard. You can redeploy at a
- [Deploying safely on Vercel without merge queues](https://vercel.com/blog/deploy-safely-on-vercel-without-merge-queues?from=related&source_path=%2Fkb%2Fguide%2Fcan-you-deploy-based-on-tags-releases-on-vercel&source_site=vercel-kb&relationship=related)
- [Promoting Deployments](https://vercel.com/docs/deployments/promoting-a-deployment?from=related&source_path=%2Fkb%2Fguide%2Fcan-you-deploy-based-on-tags-releases-on-vercel&source_site=vercel-kb&relationship=related) — Learn how to promote deployments to production on Vercel.
- [How can I use GitLab Pipelines with Vercel?](https://vercel.com/kb/guide/how-can-i-use-gitlab-pipelines-with-vercel?from=related&source_path=%2Fkb%2Fguide%2Fcan-you-deploy-based-on-tags-releases-on-vercel&source_site=vercel-kb&relationship=related) — Learn how to use GitLab Pipelines to deploy to Vercel including support for self-managed GitLab.
- [How can I use Bitbucket Pipelines with Vercel?](https://vercel.com/kb/guide/how-can-i-use-bitbucket-pipelines-with-vercel?from=related&source_path=%2Fkb%2Fguide%2Fcan-you-deploy-based-on-tags-releases-on-vercel&source_site=vercel-kb&relationship=related) — Learn how to use Bitbucket Pipelines to deploy to Vercel including support for Bitbucket Data Center.
- [How can I use CircleCI with Vercel?](https://vercel.com/kb/guide/how-can-i-use-circleci-with-vercel?from=related&source_path=%2Fkb%2Fguide%2Fcan-you-deploy-based-on-tags-releases-on-vercel&source_site=vercel-kb&relationship=related) — Learn how to use CircleCI to deploy to Vercel with custom CI/CD.
- [How to use a non-default branch for production deployments on Vercel](https://vercel.com/kb/guide/can-i-use-a-non-default-branch-for-production?from=related&source_path=%2Fkb%2Fguide%2Fcan-you-deploy-based-on-tags-releases-on-vercel&source_site=vercel-kb&relationship=related) — Learn how to set a non-default branch for production on Vercel. Open the Production environment, change branch tracking,
- [How can I use the Vercel CLI for custom workflows?](https://vercel.com/kb/guide/using-vercel-cli-for-custom-workflows?from=related&source_path=%2Fkb%2Fguide%2Fcan-you-deploy-based-on-tags-releases-on-vercel&source_site=vercel-kb&relationship=related) — You can use the Vercel CLI to deploy any application, including custom git providers and restricted source code.

Full cross-link map for this page: [/kb/guide/can-you-deploy-based-on-tags-releases-on-vercel.graph.md](/kb/guide/can-you-deploy-based-on-tags-releases-on-vercel.graph.md?from=related&source_path=%2Fkb%2Fguide%2Fcan-you-deploy-based-on-tags-releases-on-vercel&source_site=vercel-kb&relationship=graph)
<!-- /docsgraph:related -->


If your team uses a trunk-based development workflow and you want to deploy using tags and releases, this guide will walk you through the steps to automate deployments via tags instead of branches.

## Versioned deployment

Rather than using Vercel's auto-deployment feature to create a production deployment for each commit to the `main` branch, this strategy uses GitHub Actions and Vercel CLI to deploy using tags and releases.

1. Create a vercel.json file at the root of your project folder to add [Git configuration](https://vercel.com/docs/concepts/projects/project-configuration/git-configuration#). Set `git.deploymentEnabled` to false which will prevent auto-deployments from commits..
   
2. Then, let’s add the required values from Vercel as [secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets) in GitHub
   
   1. On your local computer or development environment, install the [Vercel CLI](https://vercel.com/cli) and run `vercel login`
      
   2. Inside your project folder, run `vercel link` to create a new Vercel project or link to an existing one
      
   3. Navigate to the generated `.vercel` folder, and open project.json to find the `projectID` and `orgId`
      
   4. In GitHub, set `VERCEL_PROJECT_ID` to your `projectID` and `VERCEL_ORG_ID` to your `orgID`
      
   5. Retrieve your [Vercel Access Token](https://vercel.com/guides/how-do-i-use-a-vercel-api-access-token) and set it as the value of `VERCEL_TOKEN`
      
3. Define a GitHub Action to kick off a production deployment each time a new tag is pushed.
   

```text
name: Production Tag Deployment
env:
  VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
  VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
  push:
    # Pattern matched against refs/tags
    tags:        
      - '*' # Push events to every tag not containing /
jobs:
  Deploy-Production:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Install Vercel CLI
        run: npm install --global vercel@latest
      - name: Pull Vercel Environment Information
        run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
      - name: Build Project Artifacts
        run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
      - name: Deploy Project Artifacts to Vercel
        run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
```

## Deploying Hotfixes

GitHub Actions and Vercel CLI can also be used to create production deployments for patches or hotfixes.

1. Create a `hotfix` branch.
   
2. Create a separate GitHub Action that only runs on pushes to the `hotfix` branch. This is similar to the GitHub Action defined above, but it will trigger a deployment from the `hotfix` branch for each new push to the branch.
   

```text
name: Hotfix Deployment
env:
  VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
  VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
  push:
    branches:
      - hotfix
jobs:
  Deploy-Production:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Install Vercel CLI
        run: npm install --global vercel@latest
      - name: Pull Vercel Environment Information
        run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
      - name: Build Project Artifacts
        run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
      - name: Deploy Project Artifacts to Vercel
        run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
```

Any time you need to push a hotfix, create a PR to your `hotfix` branch and Vercel will deploy directly to production using this branch.

## Preview Deployments

When deploying based on tags and releases, it’s still possible to take advantage of Preview Deployments with Vercel. By integrating [GitHub Actions with Vercel](https://vercel.com/support/articles/how-can-i-use-github-actions-with-vercel), you can have Vercel generate Preview Deployments.

For example, if your team is deploying on each release, you can create an additional GitHub Action that will create a new branch and generate a preview for each new tag.