Skip to content
Snippets Groups Projects

Api doc update

Merged Daniele Dal Santo requested to merge api-doc-update into master
Files
2
+ 25
1
@@ -51,4 +51,28 @@ tag_tags:
NEWTAG: $CI_COMMIT_TAG
extends: .tag_image
only:
- tags
\ No newline at end of file
- tags
documentation_update:
stage: tag-api
image: python:3.9
script:
- cd ..
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.cern.ch/bat/optoboard-system-docs.git
- apt-get update
- apt-get install nodejs npm -y
- npm install -g widdershins
- ls
- widdershins itk-demo-optoboard/api/itk_demo_optoboard/api/openapi/openapi.yaml -o optoboard-system-docs/docs/software/itk-demo-optoboard/itk-demo-optoboard-api.md --code --omitHeader
- perl -i -pe "s/(<h1 id=\"optoboard-flask-api\">Optoboard Flask API )\S+(<\/h1>)/\1${CI_COMMIT_TAG}\2/" optoboard-system-docs/docs/software/itk-demo-optoboard/itk-demo-optoboard-api.md
- perl -i -ne 'print unless /> Scroll down for code samples/' ./optoboard-system-docs/software/itk-demo-optoboard/itk-demo-optoboard-api.md
- git config --global user.email "itk-demo-optoboard-ci-bot@unibe.ch"
- git config --global user.name "itk-demo-optoboard CI"
- cd optoboard-system-docs
- git add -A
- git commit -m "Documentation update from https://gitlab.cern.ch/atlas-itk-pixel-systemtest/itk-demo-sw/itk-demo-optoboard CI, tag $CI_COMMIT_TAG"
- git push https://gitlab-ci-token:${DOCS_ACCESS_TOKEN}@gitlab.cern.ch/bat/optoboard-system-docs.git master
only:
- tags
allow_failure: true
\ No newline at end of file
Loading