Skip to content

Commit 5757e94

Browse files
committed
Generated antora.yml
1 parent 8cc22a1 commit 5757e94

File tree

4 files changed

+57
-23
lines changed

4 files changed

+57
-23
lines changed

.github/workflows/build-reference.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,14 @@ jobs:
1414
steps:
1515
- name: Checkout Source
1616
uses: actions/checkout@v2
17+
- name: Generate antora.yml
18+
run: ./gradlew :spring-session-docs:generateAntora
19+
- name: Push generated antora files to the spring-security-docs-generated
20+
uses: JamesIves/[email protected]
21+
with:
22+
branch: "spring-session/main" # The branch the action should deploy to.
23+
folder: "spring-session-docs/build/generateAntora" # The folder the action should deploy.
24+
repository-name: "rwinch/spring-security-docs-generated"
25+
token: ${{ secrets.GH_TOKEN_DISPATCH }}
1726
- name: Dispatch Build Request
18-
run: ${GITHUB_WORKSPACE}/.github/actions/dispatch.sh 'rwinch/spring-reference' "$GH_TOKEN_DISPATCH"
27+
run: ${GITHUB_WORKSPACE}/.github/actions/dispatch.sh 'rwinch/spring-reference' "$GH_TOKEN_DISPATCH"

spring-session-docs/antora.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,6 @@ title: Spring Session
33
version: ~
44
display_version: 2.6
55
start_page: ROOT:index.adoc
6-
asciidoc:
7-
attributes:
8-
page-pagination: true
9-
idprefix: ''
10-
idseparator: '-'
11-
download-url: "https://github.com/spring-projects/spring-session/archive/main.zip"
12-
gh-samples-url: "https://github.com/spring-projects/spring-session/tree/main/spring-session-samples/"
13-
samples-dir: "example$spring-session-samples/"
14-
session-jdbc-main-resources-dir: "example$session-jdbc-main-resources-dir/"
15-
docs-test-dir: "example$java/"
16-
websocketdoc-test-dir: 'example$java/docs/websocket/'
17-
docs-test-resources-dir: "example$resources/"
18-
indexdoc-tests: "example$java/docs/IndexDocTests.java"
19-
lettuce-version: 6.1.2.RELEASE
20-
hazelcast-version: 3.12.12
21-
spring-boot-version: 2.4.5
22-
spring-data-redis-version: 2.5.1
23-
spring-framework-version: 5.3.7
24-
spring-security-version: 5.5.0
25-
spring-session-version: 2.6.0-SNAPSHOT
266

277

288
nav:

spring-session-docs/modules/ROOT/nav.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
* xref:whats-new.adoc[What's New]
22
* xref:samples.adoc[Samples & Guides (Start Here)]
3+
** Boot Samples
4+
* xref:guides/boot-redis.adoc[HttpSession with Redis]
5+
* xref:guides/boot-jdbc.adoc[HttpSession with JDBC]
6+
* {gh-samples-url}spring-session-sample-boot-hazelcast[HttpSession with Hazelcast]
7+
* xref:guides/boot-findbyusername.adoc[Find by Username]
8+
* xref:guides/boot-websocket.adoc[WebSockets]
9+
* {gh-samples-url}spring-session-sample-boot-webflux[WebFlux]
10+
** Java Configuration
11+
** XML Configuration
312
* xref:modules.adoc[Modules]
413
* xref:http-session.adoc[HttpSession Integration]
514
* xref:web-socket.adoc[WebSocket Integration]

spring-session-docs/spring-session-docs.gradle

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,44 @@ sourceSets {
3636

3737
def versions = dependencyManagement.managedVersions
3838

39+
40+
tasks.register("generateAntora") {
41+
group = "Documentation"
42+
description = "Generates the antora.yml for dynamic properties"
43+
doLast {
44+
def dollar = '$'
45+
def ghTag = snapshotBuild ? 'main' : project.version
46+
def ghUrl = "https://github.com/spring-projects/spring-session/tree/$ghTag"
47+
def outputFile = new File("$buildDir/generateAntora/antora.yml")
48+
outputFile.getParentFile().mkdirs()
49+
outputFile.createNewFile()
50+
outputFile.setText("""name: ''
51+
title: Spring Session
52+
version: ~
53+
display_version: 2.6
54+
start_page: ROOT:index.adoc
55+
asciidoc:
56+
attributes:
57+
download-url: "https://github.com/spring-projects/spring-session/archive/${ghTag}.zip"
58+
gh-samples-url: "$ghUrl/spring-session-samples/"
59+
samples-dir: "example${dollar}spring-session-samples/"
60+
session-jdbc-main-resources-dir: "example${dollar}session-jdbc-main-resources-dir/"
61+
docs-test-dir: "example${dollar}java/"
62+
websocketdoc-test-dir: 'example${dollar}java/docs/websocket/'
63+
docs-test-resources-dir: "example${dollar}resources/"
64+
indexdoc-tests: "example${dollar}java/docs/IndexDocTests.java"
65+
spring-session-version: ${project.version}
66+
version-milestone: $milestoneBuild
67+
version-release: $releaseBuild
68+
version-snapshot: $snapshotBuild
69+
spring-boot-version: ${project.springBootVersion}
70+
spring-data-redis-version: ${versions['org.springframework.data:spring-data-redis']}
71+
spring-framework-version: ${versions['org.springframework:spring-core']}
72+
spring-security-version: ${versions['org.springframework.security:spring-security-core']}
73+
""")
74+
}
75+
}
76+
3977
asciidoctorPdf {
4078
clearSources()
4179
sources {
@@ -77,8 +115,6 @@ asciidoctorj {
77115
'docinfodir@': "."
78116
}
79117

80-
println asciidoctorj.attributes
81-
82118
repositories {
83119
maven { url "https://repo.spring.io/release" }
84120
}

0 commit comments

Comments
 (0)