I'm setting up Gitlab CI to create an asciidoc page from a Swagger YAML specification.
To this end, I've set up Gitlab to execute the swagger maven plugin and save the results to the public artifacts folder, like this:
enter codedeploy:jdk8:
stage: test
script:
- 'mvn $MAVEN_CLI_OPTS swagger2markup:convertSwagger2markup'
#only:
# - master
# Archive up the built documentation site.
artifacts:
paths:
- target/asciidoc
image: maven:3.3.9-jdk-8
pages:
image: busybox:latest
stage: deploy
script:
- mv target/asciidoc public
dependencies:
- deploy:jdk8
artifacts:
paths:
- public
#only:
# - master
My question is how to automatically upload the resulting asciidoc artifacts as wiki pages in my Gitlab project. I can browse the public artifacts folder but Gitlab doesn't render the .adoc files in there, it only offers to download them.
Update. I found Gitlab issue 18106 which is a feature request to "allow runners to push via their CI token". I think this feature would be the answer to my question, or does anyone have a better idea?