Commit 79849d7b authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Merge branch 'doc-deploy' into 'develop'

Setup for automatic documentation deployment

See merge request !38
parents cbd05a45 e14a8c7e
Loading
Loading
Loading
Loading
+36 −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
@@ -71,6 +72,22 @@ stages:
    variables:
        <<: *default_cmake_flags
        BUILD_TYPE: Debug
    only:
        changes:
            - src/**/*.{h,hpp,cpp,cu}
            - Documentation/Tutorials/**/*.{h,hpp,cpp,cu}
            - "**/CMakeLists.txt"

# Dummy build job to ensure that a pipeline is created for a merge request, even
# when there were no changes.
dummy build job:
    stage: build
    script: echo "dummy"
    except:
        changes:
            - src/**/*.{h,hpp,cpp,cu}
            - Documentation/Tutorials/**/*.{h,hpp,cpp,cu}
            - "**/CMakeLists.txt"

# Cuda builds are specified first because they take more time than host-only builds,
# which can be allocated on hosts whitout GPUs.
@@ -372,3 +389,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"