From 8d53f6ae4ee45264c44b3e27170af11d047ce472 Mon Sep 17 00:00:00 2001 From: Adrien Allard Date: Fri, 16 Feb 2024 13:22:40 +0100 Subject: [PATCH] fix: issue with deplopy script --- deploy.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/deploy.sh b/deploy.sh index c7f484f..1551915 100644 --- a/deploy.sh +++ b/deploy.sh @@ -54,13 +54,18 @@ then fi echo "Copy files..." -find $deployDir -type f -not -name 'CNAME' -delete +find $deployDir -type f -not -name '.git' -not -name 'CNAME' -not -path '*/[@.]*' -delete cp -r dist/browsify/** $deployDir -echo "Push to server..." +echo "Push to deploy branch..." git --git-dir=$deployDir/.git --work-tree=$deployDir add . git --git-dir=$deployDir/.git --work-tree=$deployDir commit -m "Deploy v$newVersion" git --git-dir=$deployDir/.git --work-tree=$deployDir push origin $deployBranch +if [ $? != 0 ] +then + >&2 echo "Failed to push to deploy branch." + exit 3 +fi echo "Clean temporary repository..." rm -rf $deployDir