Unverified Commit 252b0b46 authored by Geoffrey GREBERT's avatar Geoffrey GREBERT
Browse files

feat: auto configure mkdocs file

if not set, the following properties are automaticly configured:

* `site_url`: `$CI_PAGES_URL`
* `repo_url`: `$CI_PROJECT_URL`
parent 475cf502
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -393,6 +393,14 @@ mkdocs:
      - ${PIP_CACHE_DIR}
  script:
    - prepare_mkdocs
    - |
      if ! grep -e '^site_url: ' mkdocs.yml; then
        echo "site_url: ${CI_PAGES_URL}" >> mkdocs.yml
      fi
    - |
      if ! grep -e '^repo_url: ' mkdocs.yml; then
        echo "repo_url: ${CI_PROJECT_URL}" >> mkdocs.yml
      fi
    - mkdocs build ${MKD_BUILD_ARGS}
  artifacts:
    name: "mkdocs build from $CI_COMMIT_REF_SLUG"