Skip to content

Commit

Permalink
chore: Fix deploy key path for (what should be) the last time
Browse files Browse the repository at this point in the history
  • Loading branch information
motiz88 committed Jun 4, 2016
1 parent 3d2d9c2 commit 304f7f4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions auto-deploy-docs/doc-deploy.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash
set -e # Exit with nonzero exit code if anything fails

cd "${0%/*}"
cd ..
cd "${0%/*}" # <root>/auto-deploy-docs
cd .. # <root>

SOURCE_BRANCH="master"
TARGET_BRANCH="gh-pages"
Expand All @@ -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 # <root>/doc
git checkout $TARGET_BRANCH || git checkout --orphan $TARGET_BRANCH
git clean -f
git reset --hard
cd ..
cd .. # <root>/doc

# Run our compile script
doCompile

# Now let's go have some fun with the cloned repo
cd doc
cd doc # <root>/doc
git config user.name "Travis CI"
git config user.email "$COMMIT_AUTHOR_EMAIL"

Expand All @@ -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
Expand Down

0 comments on commit 304f7f4

Please sign in to comment.