Publish wiki component
This pipeline pushes project's markdown files into the wiki repository for documentation purposes.
Variables
| Name | required | Hints |
|---|---|---|
| GITLAB_TOKEN | no | Non-personal access token of a service account. |
Limitations of CI_JOB_TOKEN:
CI_JOB_TOKENcan't push to the wiki repository.
Setup
- Create a new folder
docs - Create Markdown files in the folder
docs - Create GitLab pipeline file
.gitlab-ci.yml:
include:
- component: $CI_SERVER_FQDN/xrow-public/ci-tools/common@stable
- component: $CI_SERVER_FQDN/xrow-public/ci-tools/publish-wiki@stable
Inputs
| Name | Description | Default | Type |
| --- | --- | --- | --- |
| dependencies | The dependencies that this job depends on. | [] | array |
| name | Name of the job | wiki | string |
| needs | The jobs that this job depends on. | [] | array |
| path | Path to the documentation files | docs | string |
| rules | The jobs that this job depends on. | [{"if":"$CI_PIPELINE_SOURCE == \"schedule\"","when":"never"},{"if":"\"$GITLAB_TOKEN\" == \"\"","when":"never"},{"if":"$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH","when":"on_success"},{"when":"never"}] | array |
| stage | The stage to run the job in | deploy | string |
| tags | The runners that this job depends on. | [] | array |