Skip to content

Commit 60529e6

Browse files
rwinchjzheaux
authored andcommitted
Initial Antora Build
1 parent 524500a commit 60529e6

File tree

12 files changed

+575
-0
lines changed

12 files changed

+575
-0
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Deploy Docs
2+
run-name: ${{ format('{0} ({1})', github.workflow, github.event.inputs.build-refname || 'all') }}
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
build-refname:
7+
description: Enter git refname to build (e.g., 5.7.x).
8+
required: false
9+
push:
10+
branches: docs-build
11+
env:
12+
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
13+
permissions:
14+
contents: write
15+
jobs:
16+
build:
17+
# if: github.repository_owner == 'spring-projects'
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v3
22+
with:
23+
fetch-depth: 5
24+
- name: Set Up Gradle
25+
uses: spring-io/spring-gradle-build-action@v2
26+
with:
27+
java-version: '17'
28+
distribution: temurin
29+
- name: Set up refname build
30+
if: github.event.inputs.build-refname
31+
run: |
32+
git fetch --depth 1 https://github.com/$GITHUB_REPOSITORY ${{ github.event.inputs.build-refname }}
33+
echo BUILD_REFNAME=${{ github.event.inputs.build-refname }} >> $GITHUB_ENV
34+
echo BUILD_VERSION=$(git cat-file --textconv FETCH_HEAD:gradle.properties | sed -n '/^version=/ { s/^version=//;p }') >> $GITHUB_ENV
35+
- name: Run Antora
36+
run: ./gradlew antora
37+
- name: Publish Docs
38+
uses: spring-io/spring-doc-actions/rsync-antora-reference@v0.0.8
39+
with:
40+
docs-username: ${{ secrets.DOCS_USERNAME }}
41+
docs-host: ${{ secrets.DOCS_HOST }}
42+
docs-ssh-key: ${{ secrets.DOCS_SSH_KEY }}
43+
docs-ssh-host-key: ${{ secrets.DOCS_SSH_HOST_KEY }}
44+
- name: Bust Cloudflare Cache
45+
uses: spring-io/spring-doc-actions/bust-cloudflare-antora-cache@v0.0.8
46+
with:
47+
context-root: spring-ldap
48+
cloudflare-zone-id: ${{ secrets.CLOUDFLARE_ZONE_ID }}
49+
cloudflare-cache-token: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}

.gitignore

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Miscellaneous
2+
*.java.hsp
3+
*.sonarj
4+
*.sw*
5+
.DS_Store
6+
build.sh
7+
integration-repo
8+
ivy-cache
9+
argfile*
10+
activemq-data/
11+
classes/
12+
13+
# Log files
14+
jxl.log
15+
jmx.log
16+
derby.log
17+
18+
# Gradle artifacts
19+
.gradle
20+
.gradletasknamecache
21+
/build
22+
buildSrc/build
23+
/spring-*/build
24+
/framework-bom/build
25+
/framework-docs/build
26+
/integration-tests/build
27+
/src/asciidoc/build
28+
spring-test/test-output/
29+
30+
# Maven artifacts
31+
pom.xml
32+
/target/
33+
34+
# Eclipse artifacts, including WTP generated manifests
35+
bin
36+
.classpath
37+
.project
38+
.settings
39+
.springBeans
40+
spring-*/src/main/java/META-INF/MANIFEST.MF
41+
42+
# IDEA artifacts and output dirs
43+
*.iml
44+
*.ipr
45+
*.iws
46+
.idea
47+
out
48+
test-output
49+
atlassian-ide-plugin.xml
50+
51+
# VS Code
52+
.vscode/
53+
54+
cached-antora-playbook.yml

.sdkmanrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Use sdkman to run "sdk env" to initialize with correct JDK version
2+
# Enable auto-env through the sdkman_auto_env config
3+
# See https://sdkman.io/usage#config
4+
# A summary is to add the following to ~/.sdkman/etc/config
5+
# sdkman_auto_env=true
6+
java=17.0.3-tem

README.adoc

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
= Spring LDAP Docs Build
2+
3+
You're currently viewing the Antora playbook branch.
4+
The playbook branch hosts the docs build that is used to build and publish the production docs site.
5+
6+
The Spring LDAP reference docs are built using https://antora.org[Antora].
7+
This README covers how to build the docs in a software branch as well as how to build the production docs site locally.
8+
9+
== Building the Site
10+
11+
You can build the entire site by invoking the following and then viewing the site at `build/site/index.html`
12+
13+
[source,bash]
14+
----
15+
./gradlew antora
16+
----
17+
18+
== Building a Specific Branch
19+
20+
You can build a specific branch and then viewing the branch specific site at `build/site/index.html`.
21+
In this case, the antora playbook is downloaded and cached from the `docs-build` branch at `lib/antora/templates/per-branch-antora-playbook.yml`.
22+
23+
[source,bash]
24+
----
25+
./gradlew antora
26+
----

antora-playbook.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
antora:
2+
extensions:
3+
- '@antora/collector-extension'
4+
- '@antora/atlas-extension'
5+
- '@opendevise/antora-release-line-extension'
6+
- '@springio/antora-extensions/latest-version-extension'
7+
- require: '@springio/antora-extensions/root-component-extension'
8+
root_component_name: 'ldap'
9+
site:
10+
title: Spring LDAP
11+
url: https://docs.spring.io/spring-ldap/reference
12+
robots: allow
13+
git:
14+
ensure_git_suffix: false
15+
content:
16+
sources:
17+
- url: https://github.com/spring-projects/spring-ldap
18+
# Refname matching:
19+
# https://docs.antora.org/antora/latest/playbook/content-refname-matching/
20+
branches: [main]
21+
asciidoc:
22+
extensions:
23+
- '@asciidoctor/tabs'
24+
- '@springio/asciidoctor-extensions'
25+
- '@springio/asciidoctor-extensions/include-code-extension'
26+
attributes:
27+
page-pagination: ''
28+
hide-uri-scheme: '@'
29+
tabs-sync-option: '@'
30+
urls:
31+
latest_version_segment_strategy: redirect:to
32+
latest_version_segment: ''
33+
redirect_facility: httpd
34+
runtime:
35+
log:
36+
failure_level: warn
37+
ui:
38+
bundle:
39+
url: https://github.com/spring-io/antora-ui-spring/releases/download/latest/ui-bundle.zip
40+
snapshot: true

build.gradle

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
plugins {
2+
id 'base'
3+
id 'org.antora' version '1.0.0'
4+
}
5+
6+
antora {
7+
version = '3.2.0-alpha.2'
8+
options = ['--clean', '--fetch', '--stacktrace']
9+
environment = [
10+
'ALGOLIA_API_KEY': '042f6aaab6ce998d2ea29e60167e1660',
11+
'ALGOLIA_APP_ID': 'WB1FQYI187',
12+
'ALGOLIA_INDEX_NAME': 'springldap'
13+
]
14+
// NOTE remember to update the versions in lib/antora/templates/per-branch-antora-playbook.yml as well
15+
dependencies = [
16+
'@antora/atlas-extension': '1.0.0-alpha.1',
17+
'@antora/collector-extension': '1.0.0-alpha.3',
18+
'@asciidoctor/tabs': '1.0.0-beta.3',
19+
'@opendevise/antora-release-line-extension': '1.0.0',
20+
'@springio/antora-extensions': '1.3.0',
21+
'@springio/asciidoctor-extensions': '1.0.0-alpha.9',
22+
]
23+
}

gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
group=org.springframework.ldap
2+
description=Spring LDAP Docs Site

gradle/wrapper/gradle-wrapper.jar

59.3 KB
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)