Skip to content

Commit 1d85f5e

Browse files
committed
Fix travis deploy to gh-pages
1 parent dacadb7 commit 1d85f5e

4 files changed

Lines changed: 12 additions & 5 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ dvm-helper/dvm-helper
3535

3636
# Aliases
3737
alias
38+
*.pem

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ script:
1111
- make cross-build
1212
before_deploy:
1313
- openssl aes-256-cbc -K $encrypted_79d16d43cbac_key -iv $encrypted_79d16d43cbac_iv -in script/travis.deploy.pem.enc -out script/travis.deploy.pem -d
14+
- chmod 600 script/travis.deploy.pem
15+
- eval "$(ssh-agent -s)" && ssh-add script/travis.deploy.pem
1416
deploy:
1517
- provider: script
1618
script: make deploy

script/deploy-gh-pages.sh

100644100755
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22
set -euo pipefail
33

44
rm -fr _deploy/ &> /dev/null
5-
git clone --branch gh-pages --depth 1 https://github.com/howtowhale/dvm.git _deploy
6-
cp -R bin/dvm/$(VERSION) _deploy/downloads/
7-
cp -R bin/dvm/$(PERMALINK) _deploy/downloads/
5+
git clone --branch gh-pages --depth 1 git@github.com:howtowhale/dvm.git _deploy
6+
7+
cp -R bin/dvm/$VERSION _deploy/downloads/
8+
cp -R bin/dvm/$PERMALINK _deploy/downloads/
89
cd _deploy/
910
git add downloads/
10-
git commit --author "Travis CI <travis@travis-ci.org>" -m "Publish $VERSION from Travis Build #$TRAVIS_BUILD_NUMBER"
11-
#PKEY=.travis.deploy.pem git push
11+
12+
git config user.name "Travis CI"
13+
git config user.email "travis@travis-ci.org"
14+
git commit -m "Publish $VERSION from Travis Build #${TRAVIS_BUILD_NUMBER:-1}"
15+
git push

script/travis.deploy.pem.enc

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)