amondnet / amondnet/vercel-action

Branch name being assigned refs/heads instead of just the branch name

未關閉
#137 2 則留言 3 個 reaction 已指派 1 人 已被 @amondnet 認領 在 GitHub 檢視
主要語言
TypeScript
星號
765
分支
116
PR 合併指標
30 天內沒有已合併 PR

描述

Hi, I have been having problems with branch names on deployments.

Let's say I am on the _branch_ **hello-world.** Git _project name_ is **project** and _teamname_ is **myteam** and I am deploying to vercel using this github-action.

This will cause **three domains** to deploy on vercel:
project-git-1234uniqueid-myteam.vercel.app
project-git-hello-world-myteam.vercel.app
project-git-refs-headshello-world-myteam.vercel.app

Under **Branch** in Vercel the branch name is now specified as **refs/heads/hello-world**

if I Disable Vercel for GitHub by setting the flag to true:

`{
"github": {
"enabled": true
}
}`

The branch is now set to **hello-world** without the refs/heads part and only the unique url and the branch url domain is set.

![github-actions](https://user-images.githubusercontent.com/8199791/159430671-5f50e7a2-513a-4779-b948-78262d964a94.png)

For reference this is how my vercel-action part looks like for me;
```
- name: Deploy to Vercel
uses: amondnet/vercel-action@v20
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.ORG_ID }}
vercel-project-id: ${{ secrets.PROJECT_ID }}
alias-domains: project-git-{{ BRANCH }}-myteam.vercel.app
scope: ${{ secrets.ORG_ID }}
```

Did I make any mistake or is there maybe a way to fix this ? This is causing problems with authentication as it relies on branch url not having the refs/heads part.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。