Skip to content

Commit

Permalink
Fix travis deploy to gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
carolynvs committed Mar 8, 2017
1 parent dacadb7 commit 1d85f5e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ dvm-helper/dvm-helper

# Aliases
alias
*.pem
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ script:
- make cross-build
before_deploy:
- openssl aes-256-cbc -K $encrypted_79d16d43cbac_key -iv $encrypted_79d16d43cbac_iv -in script/travis.deploy.pem.enc -out script/travis.deploy.pem -d
- chmod 600 script/travis.deploy.pem
- eval "$(ssh-agent -s)" && ssh-add script/travis.deploy.pem
deploy:
- provider: script
script: make deploy
Expand Down
14 changes: 9 additions & 5 deletions script/deploy-gh-pages.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
set -euo pipefail

rm -fr _deploy/ &> /dev/null
git clone --branch gh-pages --depth 1 https://github.com/howtowhale/dvm.git _deploy
cp -R bin/dvm/$(VERSION) _deploy/downloads/
cp -R bin/dvm/$(PERMALINK) _deploy/downloads/
git clone --branch gh-pages --depth 1 [email protected]:howtowhale/dvm.git _deploy

cp -R bin/dvm/$VERSION _deploy/downloads/
cp -R bin/dvm/$PERMALINK _deploy/downloads/
cd _deploy/
git add downloads/
git commit --author "Travis CI <[email protected]>" -m "Publish $VERSION from Travis Build #$TRAVIS_BUILD_NUMBER"
#PKEY=.travis.deploy.pem git push

git config user.name "Travis CI"
git config user.email "[email protected]"
git commit -m "Publish $VERSION from Travis Build #${TRAVIS_BUILD_NUMBER:-1}"
git push
Binary file modified script/travis.deploy.pem.enc
Binary file not shown.

0 comments on commit 1d85f5e

Please sign in to comment.