amondnet / amondnet/vercel-action

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

Ouverte
#137 2 commentaires 3 réactions 1 personne assignée Réclamée par @amondnet Voir sur GitHub
Langage dominant
TypeScript
Étoiles
765
Forks
116
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.