diff --git a/auto-deploy-docs/doc-deploy.sh b/auto-deploy-docs/doc-deploy.sh index ccdb1c4..774b05c 100644 --- a/auto-deploy-docs/doc-deploy.sh +++ b/auto-deploy-docs/doc-deploy.sh @@ -1,8 +1,8 @@ #!/bin/bash set -e # Exit with nonzero exit code if anything fails -cd "${0%/*}" -cd .. +cd "${0%/*}" # /auto-deploy-docs +cd .. # SOURCE_BRANCH="master" TARGET_BRANCH="gh-pages" @@ -26,17 +26,17 @@ SHA=`git rev-parse --verify HEAD` # Clone the existing gh-pages for this repo into doc/ # Create a new empty branch if gh-pages doesn't exist yet (should only happen on first deploy) git clone $REPO doc -cd doc +cd doc # /doc git checkout $TARGET_BRANCH || git checkout --orphan $TARGET_BRANCH git clean -f git reset --hard -cd .. +cd .. # /doc # Run our compile script doCompile # Now let's go have some fun with the cloned repo -cd doc +cd doc # /doc git config user.name "Travis CI" git config user.email "$COMMIT_AUTHOR_EMAIL" @@ -57,7 +57,7 @@ ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key" ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv" ENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR} ENCRYPTED_IV=${!ENCRYPTED_IV_VAR} -openssl aes-256-cbc -K $ENCRYPTED_KEY -iv $ENCRYPTED_IV -in auto-deploy-docs/deploy_key.enc -out deploy_key -d +openssl aes-256-cbc -K $ENCRYPTED_KEY -iv $ENCRYPTED_IV -in ../auto-deploy-docs/deploy_key.enc -out deploy_key -d chmod 600 deploy_key eval `ssh-agent -s` ssh-add deploy_key