From 61b68c911572dc621b7c571a0f5541ebd4f8eb09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Mac=C3=ADk?= Date: Wed, 18 May 2022 00:11:09 +0200 Subject: [PATCH] Enable site generation using GitHub sources as well as local files. (#1145) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pavel MacĂ­k --- .github/workflows/merge-to-master.yaml | 2 ++ Makefile | 5 ++++- antora-playbook.github.yaml | 22 +++++++++++++++++++ ...laybook.yaml => antora-playbook.local.yaml | 0 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 antora-playbook.github.yaml rename antora-playbook.yaml => antora-playbook.local.yaml (100%) diff --git a/.github/workflows/merge-to-master.yaml b/.github/workflows/merge-to-master.yaml index 94edab6e3f..34187cda1a 100644 --- a/.github/workflows/merge-to-master.yaml +++ b/.github/workflows/merge-to-master.yaml @@ -81,6 +81,8 @@ jobs: uses: actions/checkout@v2 - name: generate website + env: + SITE_SOURCE: github run: | make site touch ./out/site/.nojekyll diff --git a/Makefile b/Makefile index 4971841e39..97d01253ef 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,9 @@ OUTPUT_DIR ?= $(shell echo ${PWD})/out GOLANGCI_LINT_BIN=$(OUTPUT_DIR)/golangci-lint PYTHON_VENV_DIR=$(OUTPUT_DIR)/venv3 +# Source for generating docs (one of `local` and `github`) +SITE_SOURCE ?= local + CONTAINER_RUNTIME ?= docker QUAY_USERNAME ?= redhat-developer+travis @@ -334,7 +337,7 @@ clean: .PHONY: site ## render site site: - $(CONTAINER_RUNTIME) run -u $(shell id -u) -e CI=true -e HOME=/antora -v ${PWD}:/antora:Z --rm -t antora/antora:3.0.1 antora-playbook.yaml + $(CONTAINER_RUNTIME) run -u $(shell id -u) -e CI=true -e HOME=/antora -v ${PWD}:/antora:Z --rm -t antora/antora:3.0.1 antora-playbook.$(SITE_SOURCE).yaml .PHONY: test-performance-setup ## Setup OpenShift cluster for performance test diff --git a/antora-playbook.github.yaml b/antora-playbook.github.yaml new file mode 100644 index 0000000000..956a1cd251 --- /dev/null +++ b/antora-playbook.github.yaml @@ -0,0 +1,22 @@ +site: + title: Service Binding Operator Documentation + url: https://redhat-developer.github.io/service-binding-operator + start_page: userguide::intro.adoc +content: + sources: + - branches: HEAD + start_paths: docs/userguide, docs/devguide + url: https://github.com/redhat-developer/service-binding-operator + - branches: v1.0.1 + start_paths: docs/userguide, docs/devguide + url: https://github.com/redhat-developer/service-binding-operator + - branches: v1.0.0 + start_paths: docs/userguide + url: https://github.com/redhat-developer/service-binding-operator +ui: + bundle: + url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/master/raw/build/ui-bundle.zip?job=bundle-stable + snapshot: true + supplemental_files: ./hack/antora +output: + dir: ./out/site diff --git a/antora-playbook.yaml b/antora-playbook.local.yaml similarity index 100% rename from antora-playbook.yaml rename to antora-playbook.local.yaml