Skip to content
Snippets Groups Projects

Base job template to push generated documentation into project specific WIKI repository

Merged Bartek Wrona requested to merge bw_push_docs_to_wiki into develop
1 file
+ 25
0
Compare changes
  • Side-by-side
  • Inline
@@ -140,3 +140,28 @@ variables:
- if: '$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED == "true"'
when: manual
allow_failure: true
# Allows to store generated documentation files inside a wiki repo specific to given project. Wiki repo must be explicitly created before using this job.
# Documentation files coming to protected branches are committed into root directory in the wiki repo. All other changes are pushed into non-stable/<branch-name> subdirectory what allows to render them by wiki.
.npm_push_doc_template:
extends: .npm_based_job_base
variables:
# Must be overrided by derived job
WIKI_PUSH_TOKEN: ""
# The directory containing sources to be built - it can be overrided by derived job
SOURCE_DIR: "${CI_PROJECT_DIR}"
# Output directory where should be stored `docs' subdirectory containing generated documentation files
DIST_DIR: "$CI_PROJECT_DIR/dist"
script:
- /home/emscripten/scripts/npm_push_doc.sh "${SOURCE_DIR}" "${CI_PROJECT_URL}" "${WIKI_PUSH_TOKEN}" "${DIST_DIR}" "${CI_COMMIT_REF_NAME}" "${CI_COMMIT_REF_PROTECTED}"
artifacts:
reports:
dotenv:
- "gen_doc.env" # contains URL to generated documentation pointed by `GEN_DOC_URL` variable
when: always
expire_in: 1 week
Loading