Git repo must be subdir (otherwise initial clone fails)

This commit is contained in:
Stefan Schlott 2022-08-26 19:09:57 +02:00
parent 3686d1c9d7
commit f597a33756
2 changed files with 5 additions and 4 deletions

View file

@ -6,11 +6,12 @@ if [[ "$WEBSITE_SOURCE" == "" ]] ; then
fi
# Update site
cd $WEBSITE_SOURCE
if [[ -d .git ]] ; then
if [[ -d "$WEBSITE_SOURCE/.git" ]] ; then
cd $WEBSITE_SOURCE
git pull || exit 1
else
git clone git@github.com:cccs/cccs-website.git . || exit 1
git clone git@github.com:cccs/cccs-website.git "$WEBSITE_SOURCE" || exit 1
cd $WEBSITE_SOURCE
fi
# Update Twitter