Skip to content

Commit

Permalink
Travis gh pages
Browse files Browse the repository at this point in the history
  • Loading branch information
pylover committed Aug 20, 2016
1 parent c70e46a commit 00f90c3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 23 deletions.
8 changes: 2 additions & 6 deletions .travis.yml
Expand Up @@ -39,25 +39,21 @@ matrix:
- os: linux
python: nightly

# - os: linux
# python: pypy
#
# - os: linux
# python: pypy3

- os: osx
language: objective-c
python: 2.7
env:
- PY=2
- PY_SUFFIX=
- PYPI_WHEEL=yes

- os: osx
language: objective-c
python: 3.5
env:
- PY=3
- PY_SUFFIX=3
- PYPI_WHEEL=yes

before_install:
- cat /etc/hosts
Expand Down
2 changes: 1 addition & 1 deletion khayyam/__init__.py
Expand Up @@ -4,7 +4,7 @@
from .jalali_datetime import JalaliDatetime
from .timezones import TehranTimezone, Timezone

__version__ = '3.0.4'
__version__ = '3.0.5'


teh_tz = TehranTimezone()
Expand Down
30 changes: 14 additions & 16 deletions travis-gh-pages.sh
Expand Up @@ -5,6 +5,20 @@ set -e # Exit with nonzero exit code if anything fails
REPO=`git config remote.origin.url`
SHA=`git rev-parse --verify HEAD`

# Get the deploy key by using Travis's stored variables to decrypt deploy_key.enc
ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key"
ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv"
ENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR}
ENCRYPTED_IV=${!ENCRYPTED_IV_VAR}
OUT_KEY="../../.ssh/khayyam-travis-gh-pages"
#openssl aes-256-cbc -K $encrypted_d39830e202a7_key -iv $encrypted_d39830e202a7_iv -in khayyam-travis-gh-pages.enc -out ../../.ssh/khayyam-travis-gh-pages -d


openssl aes-256-cbc -K $ENCRYPTED_KEY -iv $ENCRYPTED_IV -in khayyam-travis-gh-pages.enc -out $OUT_KEY -d
chmod 600 $OUT_KEY
eval `ssh-agent -s`
ssh-add $OUT_KEY


# Clone/checkout the gh-pages branch from Github alongside the master branch working copy directory :
cd ..
Expand All @@ -31,20 +45,4 @@ fi

git add .
git commit -m "Deploy to GitHub Pages: ${SHA}"


# Get the deploy key by using Travis's stored variables to decrypt deploy_key.enc
ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key"
ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv"
ENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR}
ENCRYPTED_IV=${!ENCRYPTED_IV_VAR}
OUT_KEY="../../.ssh/khayyam-travis-gh-pages"
#openssl aes-256-cbc -K $encrypted_d39830e202a7_key -iv $encrypted_d39830e202a7_iv -in khayyam-travis-gh-pages.enc -out ../../.ssh/khayyam-travis-gh-pages -d


openssl aes-256-cbc -K $ENCRYPTED_KEY -iv $ENCRYPTED_IV -in khayyam-travis-gh-pages.enc -out $OUT_KEY -d
chmod 600 $OUT_KEY
eval `ssh-agent -s`
ssh-add $OUT_KEY

git push origin gh-pages

0 comments on commit 00f90c3

Please sign in to comment.