Git repo must be subdir (otherwise initial clone fails)
This commit is contained in:
parent
3686d1c9d7
commit
f597a33756
2 changed files with 5 additions and 4 deletions
|
|
@ -7,7 +7,7 @@ COPY scripts/update-site.sh /usr/local/bin/
|
||||||
# Home directory of user, containing ssh keys, etc.
|
# Home directory of user, containing ssh keys, etc.
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
# Website source
|
# Website source
|
||||||
ENV WEBSITE_SOURCE=/website-source
|
ENV WEBSITE_SOURCE=/website-source/git
|
||||||
VOLUME /website-source
|
VOLUME /website-source
|
||||||
# Compiled website
|
# Compiled website
|
||||||
VOLUME /website
|
VOLUME /website
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,12 @@ if [[ "$WEBSITE_SOURCE" == "" ]] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Update site
|
# Update site
|
||||||
cd $WEBSITE_SOURCE
|
if [[ -d "$WEBSITE_SOURCE/.git" ]] ; then
|
||||||
if [[ -d .git ]] ; then
|
cd $WEBSITE_SOURCE
|
||||||
git pull || exit 1
|
git pull || exit 1
|
||||||
else
|
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
|
fi
|
||||||
|
|
||||||
# Update Twitter
|
# Update Twitter
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue