Build and deploy Documentation in Travis (#1311)

This commit is contained in:
Florian Märkl 2019-03-16 23:08:33 +01:00 committed by GitHub
parent b8e9e37c86
commit c1f491c688
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 61 additions and 4 deletions

View File

@ -12,16 +12,52 @@ branches:
matrix:
include:
- os: linux
- name: Linux QMake + Deploy
os: linux
env: BUILD_SYSTEM=qmake DEPLOY=1
- os: linux
- name: Linux CMake
os: linux
env: BUILD_SYSTEM=cmake
- os: osx
- name: macOS QMake + Deploy
os: osx
osx_image: xcode10.1
env: BUILD_SYSTEM=qmake DEPLOY=1
- os: osx
- name: macOS CMake
os: osx
osx_image: xcode10.1
env: BUILD_SYSTEM=cmake
- name: Documentation + Deploy
os: linux
cache: ~
addons:
apt:
update: true
packages:
- doxygen
- python3-sphinx
- python3-breathe
before_install: ~
install: ~
before_script: ~
after_success: ~
script:
- cd docs
- make html
before_deploy:
- cd "$TRAVIS_BUILD_DIR"
- openssl aes-256-cbc -K $encrypted_bd0ed4c1fd75_key -iv $encrypted_bd0ed4c1fd75_iv -in scripts/deploy_docs_rsa.enc -out scripts/deploy_docs_rsa -d
- chmod 600 scripts/deploy_docs_rsa
- export GIT_SSH_COMMAND="/usr/bin/ssh -i $TRAVIS_BUILD_DIR/scripts/deploy_docs_rsa"
- git config --global user.name "Travis CI"
- git config --global user.email "travis@travis-ci.org"
deploy:
skip_cleanup: true
provider: script
script: bash scripts/deploy_docs.sh
on:
repo: radareorg/cutter
branch: master
sudo: required
dist: xenial

21
scripts/deploy_docs.sh Normal file
View File

@ -0,0 +1,21 @@
#!/bin/bash
cd $(dirname "${BASH_SOURCE[0]}")/..
echo "Cloning current cutter.re"
git clone git@github.com:radareorg/cutter.re.git || exit 1
echo "Updating docs"
rm -rf cutter.re/docs
cp -a docs/build/html cutter.re/docs || exit 1
echo "Committing new changes"
cd cutter.re || exit 1
git add . || exit 1
git diff --cached --quiet && echo "No changes." && exit 0
git commit -m "Update docs from radareorg/cutter"
git push origin master || exit 1

BIN
scripts/deploy_docs_rsa.enc Normal file

Binary file not shown.