👷 CI: Add GitLab CI for Antora
This commit adds a GitLab CI configuration to automatically test and build previews for new Merge Requests submitted against this repository. It provides an easier way to validate changes before merging them to the `main` branch. Signed-off-by: Justin W. Flory (he/him) <jwf@redhat.com>
This commit is contained in:
parent
55763f0b20
commit
6eecde70b0
1 changed files with 28 additions and 0 deletions
28
.gitlab-ci.yml
Normal file
28
.gitlab-ci.yml
Normal 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
|
||||
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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue