Skip to content

Commit

Permalink
Merge pull request #210 from autocrypt/ci/render
Browse files Browse the repository at this point in the history
Render and deploy from CI
  • Loading branch information
hpk42 committed Nov 6, 2017
2 parents ae4f598 + 7968e5c commit c998a9c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,37 @@ dist: trusty
python:
- '3.5'

env:
- DEPLOY_USER=autocrypt DEPLOY_SERVER="autocrypt.org"

addons:
apt:
packages:
- texlive-latex-recommended
- texlive-fonts-recommended
- texlive-latex-extra
- latexmk
- inkscape

before_install:
- openssl aes-256-cbc -K $encrypted_ee89c1e228aa_key -iv $encrypted_ee89c1e228aa_iv -in autocrypt.id_rsa.enc -out $TRAVIS_BUILD_DIR/id_rsa -d
- chmod 600 $TRAVIS_BUILD_DIR/id_rsa
install:
- pip install sphinx

script:
- cd doc
- make html
- make latexpdf
- cd ..

deploy:
provider: script
skip_cleanup: true
script: scripts/deploy.sh
on:
all_branches: true


#notifications:
# irc:
Expand Down
Binary file added autocrypt.id_rsa.enc
Binary file not shown.
17 changes: 17 additions & 0 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

# To debug your ssh connection enable this...
# scp -r -v \
# -o StrictHostKeyChecking=no \
# -o PasswordAuthentication=no \
# -o IdentitiesOnly=yes \
# -i $TRAVIS_BUILD_DIR/id_rsa \
# $TRAVIS_BUILD_DIR/doc/_build ${DEPLOY_USER}@autocrypt.org:~/test

rsync -avz $TRAVIS_BUILD_DIR/doc/_build/html/ \
${DEPLOY_USER}@autocrypt.org:build/${TRAVIS_BRANCH/\//_} \
-e "ssh -o StrictHostKeyChecking=no -o PasswordAuthentication=no -i $TRAVIS_BUILD_DIR/id_rsa"

rsync -avz $TRAVIS_BUILD_DIR/doc/_build/latex/autocrypt*.pdf \
${DEPLOY_USER}@autocrypt.org:build/${TRAVIS_BRANCH/\//_} \
-e "ssh -o StrictHostKeyChecking=no -o PasswordAuthentication=no -i $TRAVIS_BUILD_DIR/id_rsa"

0 comments on commit c998a9c

Please sign in to comment.