1
0
Fork 0
forked from docs/team-docs

add initial ci job

This commit is contained in:
darknao 2022-06-08 20:24:03 +02:00
commit a652174f8f
3 changed files with 31 additions and 3 deletions

28
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,28 @@
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
pages:
stage: build
image:
name: antora/antora:latest
script:
- antora site.yml
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == "main"