Skip to content

Commit

Permalink
chore(build): add ssh key setup to docdeploy
Browse files Browse the repository at this point in the history
  • Loading branch information
alyec committed Jun 14, 2017
1 parent ee3af8d commit 1ca0790
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scripts/docdeploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@ set -e

if [ "$TRAVIS_REPO_SLUG" == "fgpv-vpgf/geoApi" ] && [ -n "$TRAVIS_TAG" ]; then
npm run doc
# this section assumes the id_rsa key has already been decrypted
# devdeploy.sh should run before this script

openssl aes-256-cbc -k "$PW" -out ~/.ssh/id_rsa -in devkey.enc -d
echo -e "Host *\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
chmod 600 ~/.ssh/id_rsa
eval `ssh-agent -s`
ssh-add ~/.ssh/id_rsa

git clone --depth=1 [email protected]:fgpv-vpgf/geoApi.git -b gh-pages ghdocs
ls ghdocs
mkdir -p ghdocs/$TRAVIS_TAG
rsync -av --delete docbuild/ ghdocs/$TRAVIS_TAG/
bash ./scripts/make_doc_index.sh ghdocs/ > ghdocs/index.html

cd ghdocs
git add $TRAVIS_TAG
git add index.html
Expand Down

0 comments on commit 1ca0790

Please sign in to comment.