Change branch detection

This commit is contained in:
Gabriel Simmer 2023-05-05 11:24:00 +01:00
parent 57db3a8085
commit 592d5754eb
Signed by: arch
GPG key ID: C81B106D46C5B875

View file

@ -22,9 +22,8 @@ tasks:
# Get current git branch
echo "Deploying to Vercel"
export CI_BRANCH=$(git rev-parse --abbrev-ref HEAD)
# If trunk branch, use --prod, otherwise just deploy
if [ "$CI_BRANCH" = "trunk" ]; then
if [ "$(git rev-parse origin/trunk)" != "$(git rev-parse HEAD)" ]; then
echo "Deploying to production"
vercel deploy --prod --token $VERCEL_API_TOKEN
else