-
Notifications
You must be signed in to change notification settings - Fork 396
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
504 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Deploy Docs | ||
run-name: ${{ format('{0} ({1})', github.workflow, github.event.inputs.build-refname || 'all') }} | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
build-refname: | ||
description: Enter git refname to build (e.g., 5.7.x). | ||
required: false | ||
push: | ||
branches: docs-build | ||
env: | ||
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} | ||
permissions: read-all | ||
jobs: | ||
build: | ||
if: github.repository_owner == 'spring-projects' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 5 | ||
- name: Set Up Gradle | ||
uses: spring-io/spring-gradle-build-action@v2 | ||
with: | ||
java-version: '17' | ||
distribution: temurin | ||
- name: Set up refname build | ||
if: github.event.inputs.build-refname | ||
run: | | ||
git fetch --depth 1 https://github.com/$GITHUB_REPOSITORY ${{ github.event.inputs.build-refname }} | ||
echo BUILD_REFNAME=${{ github.event.inputs.build-refname }} >> $GITHUB_ENV | ||
echo BUILD_VERSION=$(git cat-file --textconv FETCH_HEAD:gradle.properties | sed -n '/^version=/ { s/^version=//;p }') >> $GITHUB_ENV | ||
- name: Run Antora | ||
run: ./gradlew antora | ||
- name: Copy the cache to be included in the site | ||
run: cp -rf build/antora/inject-collector-cache-config-extension/.cache build/site/ | ||
- name: Publish Docs | ||
uses: spring-io/spring-doc-actions/rsync-antora-reference@v0.0.11 | ||
with: | ||
docs-username: ${{ secrets.DOCS_USERNAME }} | ||
docs-host: ${{ secrets.DOCS_HOST }} | ||
docs-ssh-key: ${{ secrets.DOCS_SSH_KEY }} | ||
docs-ssh-host-key: ${{ secrets.DOCS_SSH_HOST_KEY }} | ||
- name: Bust Clouflare Cache | ||
uses: spring-io/spring-doc-actions/bust-cloudflare-antora-cache@v0.0.11 | ||
with: | ||
context-root: spring-shell | ||
cloudflare-zone-id: ${{ secrets.CLOUDFLARE_ZONE_ID }} | ||
cloudflare-cache-token: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/.gradle/ | ||
/.idea/* | ||
/.settings/ | ||
/.classpath | ||
/.project | ||
/build/ | ||
/node_modules/ | ||
/package-lock.json | ||
/*.iml | ||
/*.ipr | ||
/*.iws | ||
!/.idea/checkstyle-idea.xml | ||
!/.idea/externalDependencies.xml |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
= Spring Shell Docs Build | ||
|
||
You're currently viewing the Antora playbook branch. | ||
The playbook branch hosts the docs build that is used to build and publish the production docs site. | ||
|
||
The Spring Shell reference docs are built using https://antora.org[Antora]. | ||
This README covers how to build the docs in a software branch as well as how to build the production docs site locally. | ||
|
||
== Building the Site | ||
|
||
You can build the entire site by invoking the following and then viewing the site at `build/site/index.html` | ||
|
||
[source,bash] | ||
---- | ||
./gradlew antora | ||
---- | ||
|
||
== Building a Specific Branch | ||
|
||
You can build a specific branch and then viewing the branch specific site at `build/site/index.html`. | ||
|
||
[source,bash] | ||
---- | ||
./gradlew antora | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
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' | ||
site: | ||
title: Spring Shell | ||
url: https://docs.spring.io/spring-shell/reference | ||
robots: allow | ||
git: | ||
ensure_git_suffix: false | ||
content: | ||
sources: | ||
- url: https://github.com/spring-projects/spring-shell | ||
# Refname matching: | ||
# https://docs.antora.org/antora/latest/playbook/content-refname-matching/ | ||
branches: [ main,'({3..9}).+({0..9}).x', '!(3.{0..1}.x)' ] | ||
tags: [ 'v({3..9}).+({0..9}).+({0..9})?(-{RC,M}+({0..9}))', '!(v3.{0..1}.+({0..9})?(-{RC,M}+({0..9})))' ] | ||
start_path: spring-shell-docs | ||
asciidoc: | ||
attributes: | ||
page-stackoverflow-url: https://stackoverflow.com/tags/spring-shell | ||
page-pagination: '' | ||
hide-uri-scheme: '@' | ||
tabs-sync-option: '@' | ||
extensions: | ||
- '@asciidoctor/tabs' | ||
- '@springio/asciidoctor-extensions' | ||
urls: | ||
latest_version_segment_strategy: redirect:to | ||
latest_version_segment: '' | ||
redirect_facility: httpd | ||
ui: | ||
bundle: | ||
url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.3.3/ui-bundle.zip | ||
runtime: | ||
log: | ||
failure_level: warn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
plugins { | ||
id 'base' | ||
id 'org.antora' version '1.0.0' | ||
} | ||
|
||
antora { | ||
version = '3.2.0-alpha.2' | ||
options = [clean: true, fetch: true, stacktrace: true] | ||
environment = [ | ||
'ALGOLIA_API_KEY': '9d489079e5ec46dbb238909fee5c9c29', | ||
'ALGOLIA_APP_ID': 'WB1FQYI187', | ||
'ALGOLIA_INDEX_NAME': 'springshell', | ||
] | ||
dependencies = [ | ||
'@antora/atlas-extension': '1.0.0-alpha.1', | ||
'@antora/collector-extension': '1.0.0-alpha.3', | ||
'@asciidoctor/tabs': '1.0.0-beta.3', | ||
'@springio/antora-extensions': '1.4.2', | ||
'@springio/asciidoctor-extensions': '1.0.0-alpha.8', | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
group=org.springframework.shell | ||
description=Spring GraphQL Docs Site |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.