1
0
Fork 0
forked from docs/team-docs
docs-team-docs/.gitlab-ci.yml
2022-11-29 10:28:37 +01:00

47 lines
1.2 KiB
YAML

build:
stage: build
image:
name: antora/antora:latest
script:
- antora --log-failure-level fatal site.yml
artifacts:
paths:
- public/
expire_in: 1 week
expose_as: 'docs preview'
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
environment:
name: preview MR_${CI_MERGE_REQUEST_IID}
url: https://${CI_SERVER_HOST}/${CI_PROJECT_PATH}/-/jobs/${CI_JOB_ID}/artifacts/file/public/index.html
auto_stop_in: 1 week
pages:
stage: build
image:
name: antora/antora:latest
script:
- antora site.yml
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == "main" && $CI_PROJECT_ROOT_NAMESPACE == "fedora"
code_quality:
image:
name: jdkato/vale:latest
entrypoint: [""]
tags: [shared]
variables:
VARH_REPO: "redhat-documentation/vale-at-red-hat"
VARH_BRANCH: "main"
before_script:
- apk add --no-cache curl asciidoctor python3
- |
curl -o vale2cc.py \
https://raw.githubusercontent.com/${VARH_REPO}/${VARH_BRANCH}/tools/vale2cc.py
script:
- vale --no-exit --output=JSON . | python3 vale2cc.py > gl-code-quality-report.json
artifacts:
reports:
codequality: gl-code-quality-report.json