Update entrypoint.sh

This commit is contained in:
James Ives 2019-03-04 08:41:33 -05:00
parent a2c3f4b943
commit 9599d53b6d

View File

@ -46,6 +46,7 @@ REMOTE_BRANCH = `git ls-remote --heads "https://${ACCESS_TOKEN}@github.com:James
# If the branch doesn't exist it gets created here as an orphan. # If the branch doesn't exist it gets created here as an orphan.
if [[ -z $REMOTE_BRANCH ]] if [[ -z $REMOTE_BRANCH ]]
then then
echo "Creating remote branch ${BRANCH} as it doesn't exist..."
git checkout --orphan $BRANCH && \ git checkout --orphan $BRANCH && \
git rm -rf . && \ git rm -rf . && \
touch README.md && \ touch README.md && \
@ -70,4 +71,4 @@ echo "Deploying to GitHub..." && \
git add -f $FOLDER && \ git add -f $FOLDER && \
git commit -m "Deploying to ${BRANCH} - $(date +"%T")" && \ git commit -m "Deploying to ${BRANCH} - $(date +"%T")" && \
git push $REPOSITORY_PATH `git subtree split --prefix $FOLDER master`:$BRANCH --force && \ git push $REPOSITORY_PATH `git subtree split --prefix $FOLDER master`:$BRANCH --force && \
echo "Deployment Succesful!" echo "Deployment succesful!"