This commit is contained in:
Alix Andrieu 2022-07-27 18:53:01 +02:00
commit d1aca1c3af
2 changed files with 54 additions and 0 deletions

29
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,29 @@
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"

25
site.yml Normal file
View file

@ -0,0 +1,25 @@
site:
title: Local Preview
start_page: docs::index.adoc
content:
sources:
- url: .
start_path: homepage
branches: HEAD
- url: .
start_path: engineering
branches: HEAD
- url: .
start_path: mindshare
branches: HEAD
ui:
bundle:
url: https://gitlab.com/fedora/docs/docs-website/ui-bundle/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable
snapshot: true
default_layout: with_menu
output:
clean: true
dir: ./public
runtime:
fetch: true
cache_dir: ./cache