Newer
Older
retry:
max: 2
when: runner_system_failure
# HACK to easier linking to the generated pages
- echo '<meta http-equiv="REFRESH" content="0;URL=build/docs/index.html">' >> Doxygen.html
- mkdir -p build
- cd build
script:
- cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DOGS_USE_CONAN=OFF -DOGS_BUILD_PROCESSES=GroundwaterFlow
- cmake --build . --target doc > >(tee make-docs.output)
- cp ../scripts/doc/_redirects docs
dependencies: [meta_container, "build docs"]
extends:
- .rules-master-manual
script:
- cd build
- >
urlchecker check --retry-count 5 --file-types .html
--white-listed-patterns \<\;,\",www.w3.org,www.doxygen.org,cdnjs.cloudflare.com,docs.opengeosys.org/docs/tools
--white-listed-urls http://www.opengeosys.org/project/license,http://www.opengeosys.org,http://www.opengeosys.org\",http://www.trolltech.com/products/qt/licensing.html,http://www.trolltech.com/products/qt/opensource.html
--white-listed-files project_file_doc_qa.html,ogs_file_
docs
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
variables:
ON_MASTER: "true"
- if: $CI_COMMIT_BRANCH =~ /^v[0-9]\.[0-9]\.[0-9]/
dependencies: [meta_container, "build docs"]
# ${CI_COMMIT_BRANCH//./-} replaces dots with hyphens
- |
if [ "$ON_MASTER" == "true" ]; then
netlify deploy --prod --dir=build/docs --site=$DOXYGEN_NETLIFY_SITE_ID
else
netlify link --name ogs-doxygen-${CI_COMMIT_BRANCH//./-}
netlify deploy --prod --dir=build/docs
fi