mirror of
https://github.com/deltachat/deltachat-core.git
synced 2025-10-04 18:29:19 +02:00
Merge pull request #313 from deltachat/ci-build-docs
Ci build docs and deploy
This commit is contained in:
commit
f487266489
4 changed files with 61 additions and 12 deletions
BIN
.credentials/delta.id_rsa.enc
Normal file
BIN
.credentials/delta.id_rsa.enc
Normal file
Binary file not shown.
34
.scripts/deploy.sh
Executable file
34
.scripts/deploy.sh
Executable file
|
@ -0,0 +1,34 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -u
|
||||
set -x
|
||||
set -v
|
||||
|
||||
|
||||
#Only attempt to deploy if we know the ssh key secrets, username and server
|
||||
if test -z ${encrypted_49475b8073e9_key:+decryp_key} ; then exit 0; fi
|
||||
if test -z ${encrypted_49475b8073e9_iv:+decrypt_iv} ; then exit 0; fi
|
||||
if test -z ${DEPLOY_USER:+username} ; then exit 0; fi
|
||||
if test -z ${DEPLOY_SERVER:+server} ; then exit 0; fi
|
||||
|
||||
# Prepare the ssh homedir.
|
||||
#
|
||||
# Decrypting the ssh private key for deploying to the server.
|
||||
# See https://docs.travis-ci.com/user/encrypting-files/ for details.
|
||||
mkdir -p -m 0700 ~/.ssh
|
||||
openssl aes-256-cbc \
|
||||
-K $encrypted_49475b8073e9_key \
|
||||
-iv $encrypted_49475b8073e9_iv \
|
||||
-in .credentials/delta.id_rsa.enc \
|
||||
-out ~/.ssh/id_rsa -d
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
printf "Host *\n" >> ~/.ssh/config
|
||||
printf " %sAuthentication no\n" ChallengeResponse Password KbdInteractive >> ~/.ssh/config
|
||||
|
||||
|
||||
# Perform the actual deploy
|
||||
rsync -avz \
|
||||
-e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" \
|
||||
$TRAVIS_BUILD_DIR/python/doc/_build/html/ \
|
||||
${DEPLOY_USER}@${DEPLOY_SERVER}:build/${TRAVIS_BRANCH/\//_}
|
20
.travis.yml
20
.travis.yml
|
@ -1,4 +1,8 @@
|
|||
sudo: required
|
||||
language: c
|
||||
|
||||
env:
|
||||
- DEPLOY_USER=delta DEPLOY_SERVER="py.delta.chat"
|
||||
|
||||
addons:
|
||||
apt:
|
||||
|
@ -10,8 +14,6 @@ addons:
|
|||
- g++-7
|
||||
- doxygen
|
||||
|
||||
language: c
|
||||
|
||||
before_install:
|
||||
- export CC=gcc-7
|
||||
- export CXX=g++-7
|
||||
|
@ -25,7 +27,7 @@ before_install:
|
|||
- pushd cyrus-sasl2-2.1.27~101-g0780600+dfsg.orig && ./autogen.sh && make && sudo make install && popd
|
||||
|
||||
install:
|
||||
- sudo apt install -y libssl-dev libsqlite3-dev libbz2-dev zlib1g-dev python3.5-dev
|
||||
- sudo apt install -y libssl-dev libsqlite3-dev libbz2-dev zlib1g-dev python3.5-dev sphinx-doc
|
||||
|
||||
script:
|
||||
- mkdir -p builddir && cd builddir && meson && ninja -v && sudo ninja install
|
||||
|
@ -39,3 +41,15 @@ script:
|
|||
- pip install tox
|
||||
- ldd /usr/local/lib/x86_64-linux-gnu/libdeltachat.so
|
||||
- tox
|
||||
- pip install -e .
|
||||
- pip install sphinx breathe
|
||||
- cd doc
|
||||
- make html
|
||||
- cd ../..
|
||||
|
||||
deploy:
|
||||
provider: script
|
||||
skip_cleanup: true
|
||||
script: .scripts/deploy.sh
|
||||
on:
|
||||
all_branches: true
|
||||
|
|
|
@ -8,6 +8,7 @@ SPHINXOPTS =
|
|||
SPHINXBUILD = sphinx-build
|
||||
PAPER =
|
||||
BUILDDIR = _build
|
||||
RSYNCOPTS = -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
|
||||
|
||||
export HOME=/tmp/home
|
||||
export TESTHOME=$(HOME)
|
||||
|
@ -79,7 +80,7 @@ doczip: html
|
|||
python doczip.py $(DOCZIP) _build/html
|
||||
|
||||
install: html
|
||||
rsync -avz _build/html/ delta@py.delta.chat:build/master
|
||||
rsync -avz $(RSYNCOPTS) _build/html/ delta@py.delta.chat:build/master
|
||||
|
||||
|
||||
html:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue