From 02964ae3857cf778f249bd0b44cc1a0859f2b3f2 Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Thu, 3 Aug 2023 11:11:12 -0500 Subject: [PATCH] Copy default antora files --- .../.github/workflows/deploy-docs.yml | 33 ++++++++++++++ spring-shell-docs/antora-playbook.yml | 44 +++++++++++++++++++ spring-shell-docs/antora.yml | 20 +++++++++ 3 files changed, 97 insertions(+) create mode 100644 spring-shell-docs/.github/workflows/deploy-docs.yml create mode 100644 spring-shell-docs/antora-playbook.yml create mode 100644 spring-shell-docs/antora.yml diff --git a/spring-shell-docs/.github/workflows/deploy-docs.yml b/spring-shell-docs/.github/workflows/deploy-docs.yml new file mode 100644 index 00000000..1435fc21 --- /dev/null +++ b/spring-shell-docs/.github/workflows/deploy-docs.yml @@ -0,0 +1,33 @@ +name: Deploy Docs +on: + push: + branches-ignore: [ gh-pages ] + tags: '**' + repository_dispatch: + types: request-build-reference # legacy + #schedule: + #- cron: '0 10 * * *' # Once per day at 10am UTC + workflow_dispatch: +permissions: + actions: write +jobs: + build: + runs-on: ubuntu-latest + # FIXME enable when pushed to spring-projects + # if: github.repository_owner == 'spring-projects' + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: docs-build + fetch-depth: 1 + - name: Dispatch (partial build) + if: github.ref_type == 'branch' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh workflow run deploy-docs.yml -r $(git rev-parse --abbrev-ref HEAD) -f build-refname=${{ github.ref_name }} + - name: Dispatch (full build) + if: github.ref_type == 'tag' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh workflow run deploy-docs.yml -r $(git rev-parse --abbrev-ref HEAD) diff --git a/spring-shell-docs/antora-playbook.yml b/spring-shell-docs/antora-playbook.yml new file mode 100644 index 00000000..714e601d --- /dev/null +++ b/spring-shell-docs/antora-playbook.yml @@ -0,0 +1,44 @@ +# PACKAGES antora@3.2.0-alpha.2 @antora/atlas-extension:1.0.0-alpha.1 @antora/collector-extension@1.0.0-alpha.3 @springio/antora-extensions@1.1.0-alpha.2 @asciidoctor/tabs@1.0.0-alpha.12 @opendevise/antora-release-line-extension@1.0.0-alpha.2 +# +# The purpose of this Antora playbook is to build the docs in the current branch. +antora: + extensions: + - '@springio/antora-extensions/partial-build-extension' + - require: '@springio/antora-extensions/latest-version-extension' + - require: '@springio/antora-extensions/inject-collector-cache-config-extension' + - '@antora/collector-extension' + - '@antora/atlas-extension' + - require: '@springio/antora-extensions/root-component-extension' + root_component_name: 'shell' + - require: '@springio/antora-extensions/tabs-migration-extension' + unwrap_example_block: always + save_result: true +site: + title: Spring Shell + url: https://docs.spring.io/spring-shell/reference/ +content: + sources: + - url: ./.. + branches: HEAD + start_path: spring-shell-docs + worktrees: true +asciidoc: + attributes: + page-stackoverflow-url: https://stackoverflow.com/tags/spring-shell + page-pagination: '' + hide-uri-scheme: '@' + tabs-sync-option: '@' + chomp: 'all' + extensions: + - '@asciidoctor/tabs' + - '@springio/asciidoctor-extensions' + sourcemap: true +urls: + latest_version_segment: '' +runtime: + log: + failure_level: warn + format: pretty +ui: + bundle: + url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.3.4/ui-bundle.zip \ No newline at end of file diff --git a/spring-shell-docs/antora.yml b/spring-shell-docs/antora.yml new file mode 100644 index 00000000..9b34c10b --- /dev/null +++ b/spring-shell-docs/antora.yml @@ -0,0 +1,20 @@ +name: shell +version: true +title: Spring Shell +nav: + - modules/ROOT/nav.adoc +ext: + collector: + run: + command: gradlew -q "-Dorg.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError" :spring-shell-docs:generateAntoraYml + local: true + scan: + dir: ./build/generated-antora-resources + +asciidoc: + attributes: + attribute-missing: 'warn' + # FIXME: the copyright is not removed + # FIXME: The package is not renamed + chomp: 'all' + snippets: example$docs-src/test/java/org/springframework/shell/docs \ No newline at end of file