Skip to content
Snippets Groups Projects
Commit eaf39b14 authored by Bartek Wrona's avatar Bartek Wrona
Browse files

Defined template job base definition: `.npm_push_doc_template'

parent 5d3ec0e4
No related branches found
No related tags found
1 merge request!52Base job template to push generated documentation into project specific WIKI repository
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment