Generate the branch preview URL for a Vercel deployment
Useful if you want to know the branch preview URL ahead of a Vercel deployment being completed.
vercel-team-id
: your Vercel team IDvercel-project-name
: your Vercel project namegit-branch-name
: the Git branch name
url
: the branch preview URL
jobs:
branch-preview-url:
steps:
- name: Generate branch preview URL
id: branch-preview-url
uses: PenfoldTechnology/vercel-branch-preview-url-action@v1.0.0
with:
git-branch-name: ${{ github.head_ref || github.ref_name }}
vercel-project-name: fancy-project
vercel-team-id: fancy-team
- name: Print URL
run: echo "${{ steps.branch-preview-url.outputs.url }}"