From a652174f8f560c66f6e6f57722799274a426511a Mon Sep 17 00:00:00 2001 From: darknao Date: Wed, 8 Jun 2022 20:24:03 +0200 Subject: [PATCH] add initial ci job --- .gitlab-ci.yml | 28 ++++++++++++++++++++++++++++ antora.yml | 2 +- site.yml | 4 ++-- 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..26c7360 --- /dev/null +++ b/.gitlab-ci.yml @@ -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" + diff --git a/antora.yml b/antora.yml index 6c95577..63f4c45 100644 --- a/antora.yml +++ b/antora.yml @@ -9,7 +9,7 @@ title: Fedora Docs Team version: master # We encourage you to name the index page as "index.adoc". If you absolutely have to use a different name, please reflect it here. You can ignore this field otherwise. -start_page: ROOT:index +start_page: ROOT:index.adoc # This lists all the menu definitions of your component. nav: diff --git a/site.yml b/site.yml index 1c05e92..bc06ad5 100644 --- a/site.yml +++ b/site.yml @@ -1,13 +1,13 @@ site: title: Documentation Contributor's Guide - start_page: fedora-docs::index + start_page: fedora-docs::index.adoc content: sources: - url: . branches: HEAD ui: bundle: - url: https://asamalik.fedorapeople.org/ui-bundle.zip + 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: