Commit a726c388 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Setup for automatic documentation deployment

parent cbd05a45
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ before_script:
# same job.
stages:
    - build
    - deploy

# default flags for cmake
.default_cmake_flags_def: &default_cmake_flags
@@ -372,3 +373,22 @@ mpi_benchmarks_tools_python_Release:
        WITH_BENCHMARKS: "yes"
        WITH_TOOLS: "yes"
        WITH_PYTHON: "yes"


deploy documentation:
    stage: deploy
    only:
        variables:
            - $TNL_DOC_DEPLOY_KEY
        changes:
            - Documentation/**/*
            - src/TNL/**/*.{h,hpp}
        refs:
            - develop
            - schedules
            - triggers
    script:
        - ./Documentation/build
        - ./Documentation/deploy
    tags:
        - doxygen
+1 −1
Original line number Diff line number Diff line
@@ -1260,7 +1260,7 @@ HTML_COLORSTYLE_GAMMA = 80
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_TIMESTAMP         = NO
HTML_TIMESTAMP         = YES

# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
# documentation will contain sections that can be hidden and shown after the
+14 −1
Original line number Diff line number Diff line
@@ -13,4 +13,17 @@ cd ${0%/*}

[[ ! -d "$OUTPUTDIR" ]] && ./build

rsync -e "ssh -p $SSH_PORT" -P -rvzc --cvs-exclude --delete "$OUTPUTDIR/" "$SSH_USER@$SSH_HOST:$SSH_TARGET_DIR"
# set default arguments for ssh
SSH_ARGS="-p $SSH_PORT"

# When the script is run from continuous integration, the ssh key should be
# specified by this environment variable. We need to put it into a temporary
# file and pass it to ssh.
if [[ "$TNL_DOC_DEPLOY_KEY" != "" ]]; then
   tempfile=$(mktemp)
   trap "rm -f $tempfile" EXIT
   echo "$TNL_DOC_DEPLOY_KEY" | base64 -d > "$tempfile"
   SSH_ARGS="$SSH_ARGS -i $tempfile"
fi

rsync -e "ssh $SSH_ARGS" -P -rvzc --cvs-exclude --delete "$OUTPUTDIR/" "$SSH_USER@$SSH_HOST:$SSH_TARGET_DIR"