https://gitlab.opengeosys.org/ogs/ogs.git
Raw File
Tip revision: f786162861dfbb3fe59d248508a093daf1f87668 authored by wenqing on 25 March 2021, 10:27:59 UTC
Merge branch 'physical_constant' into 'master'
Tip revision: f786162
build-docs.yml
build docs:
  stage: build
  tags: [shell, envinf]
  dependencies: [meta]
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
      variables:
        ON_MASTER: "true"
        DEPLOY: "true"
    - if: $CI_COMMIT_BRANCH =~ /^v[0-9]\.[0-9]\.[0-9]/
      variables:
        DEPLOY: "true"
    - when: always
  retry:
    max: 2
    when: runner_system_failure
  before_script:
    # 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)
    - cat DoxygenWarnings.log|grep -v 'too many nodes'
    - echo "doxygen_warnings `cat DoxygenWarnings.log|grep warning:|grep -v 'too many nodes'|wc -l|xargs`" > metrics.txt
    - |
      if [ "$DEPLOY" == "true" ]; then
        if [ "$ON_MASTER" == "true" ]; then
            cp ../scripts/doc/_redirects docs
            netlify deploy --prod --dir=docs --site=$DOXYGEN_NETLIFY_SITE_ID
        else
            netlify link --name ogs-doxygen-${CI_COMMIT_BRANCH//./-}
            netlify deploy --prod --dir=docs
        fi
      fi
  artifacts:
    expose_as: 'Doxygen'
    paths:
      - Doxygen.html
      - build/docs
    expire_in: 1 week
    reports:
      metrics: build/metrics.txt

check docs links:
  stage: check
  tags: [ docker ]
  allow_failure: true
  image: $WEB_IMAGE
  dependencies: [meta, "build docs"]
  extends:
      - .rules-master-manual
  script:
    - cd build
    - >
      urlchecker check --retry-count 5 --file-types .html
      --white-listed-patterns \&lt\;,\&quot,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\&quot,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
back to top