Commit d11f2245 authored by Dion Haefner's avatar Dion Haefner

added auto-deployment of documentation #19

parent bb5573a1
......@@ -7,20 +7,34 @@ before_script:
- cd /opt/dune
stages:
- main
- build
- deploy
main_job:
build:main:
script:
- ./dune-common/bin/dunecontrol --only=dorie all
- export PATH=/opt/dune/dorie/build-cmake/bin:$PATH
- ARGS="--output-on-failure" ./dune-common/bin/dunecontrol --only=dorie make test
stage: main
- ARGS="--output-on-failure -j 2" ./dune-common/bin/dunecontrol --only=dorie make test
- ./dune-common/bin/dunecontrol --only=dorie make doc
stage: build
artifacts:
name: "$CI_BUILD_NAME"
paths:
- $CI_PROJECT_DIR/build-cmake/doc/html/
expire_in: 1 week
update_dune_job:
build:update_dune:
script:
- ./dune-common/bin/dunecontrol update || true
- ./dune-common/bin/dunecontrol exec "rm -rf build-cmake"
- ./dune-common/bin/dunecontrol all
- export PATH=/opt/dune/dorie/build-cmake/bin:$PATH
- ARGS="--output-on-failure" ./dune-common/bin/dunecontrol --only=dorie make test
stage: main
- ARGS="--output-on-failure -j 2" ./dune-common/bin/dunecontrol --only=dorie make test
stage: build
deploy:docs:
script:
- cd $CI_PROJECT_DIR && bash deploy_docs.sh
stage: deploy
only:
- master
LOCAL=$CI_BUILD_REF
git checkout $GITBRANCH -q
REMOTE=$(git rev-parse $GITBRANCH@{upstream})
git checkout $LOCAL -q
cd $PARENTDIR
if [ "$LOCAL" = "$REMOTE" ]; then
echo "Deploying documentation to dorie-docs.bitballoon.com"
echo "{\"access_token\":\"$CI_BITBALLOON_TOKEN\",\"site_id\":\"$CI_BITBALLOON_ID\"}" > .bitballoon
if [[ -z build-cmake/doc/html/index.html ]]; then
echo "ERROR: no index.html in doc folder"
exit 1
fi
if ! command -v gem >/dev/null 2>&1; then
apt-get install ruby-dev
fi
if ! command -v bitballoon >/dev/null 2>&1; then
gem install bitballoon
fi
bitballoon deploy build-cmake/doc/html
else
echo "Commit $LOCAL is not the most recent commit on branch $GITBRANCH ($REMOTE) - skipping deployment"
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment