mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-20 03:46:11 +00:00
Build and deploy Documentation in Travis (#1311)
This commit is contained in:
parent
b8e9e37c86
commit
c1f491c688
44
.travis.yml
44
.travis.yml
@ -12,16 +12,52 @@ branches:
|
|||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: linux
|
- name: Linux QMake + Deploy
|
||||||
|
os: linux
|
||||||
env: BUILD_SYSTEM=qmake DEPLOY=1
|
env: BUILD_SYSTEM=qmake DEPLOY=1
|
||||||
- os: linux
|
- name: Linux CMake
|
||||||
|
os: linux
|
||||||
env: BUILD_SYSTEM=cmake
|
env: BUILD_SYSTEM=cmake
|
||||||
- os: osx
|
- name: macOS QMake + Deploy
|
||||||
|
os: osx
|
||||||
osx_image: xcode10.1
|
osx_image: xcode10.1
|
||||||
env: BUILD_SYSTEM=qmake DEPLOY=1
|
env: BUILD_SYSTEM=qmake DEPLOY=1
|
||||||
- os: osx
|
- name: macOS CMake
|
||||||
|
os: osx
|
||||||
osx_image: xcode10.1
|
osx_image: xcode10.1
|
||||||
env: BUILD_SYSTEM=cmake
|
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
|
sudo: required
|
||||||
dist: xenial
|
dist: xenial
|
||||||
|
21
scripts/deploy_docs.sh
Normal file
21
scripts/deploy_docs.sh
Normal 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
BIN
scripts/deploy_docs_rsa.enc
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user