Change branch detection
This commit is contained in:
parent
57db3a8085
commit
592d5754eb
|
@ -22,9 +22,8 @@ tasks:
|
||||||
# Get current git branch
|
# Get current git branch
|
||||||
|
|
||||||
echo "Deploying to Vercel"
|
echo "Deploying to Vercel"
|
||||||
export CI_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
|
||||||
# If trunk branch, use --prod, otherwise just deploy
|
# 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"
|
echo "Deploying to production"
|
||||||
vercel deploy --prod --token $VERCEL_API_TOKEN
|
vercel deploy --prod --token $VERCEL_API_TOKEN
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue