diff --git a/.github/workflows/build-reference.yml b/.github/workflows/build-reference.yml index 3e3f714e..357257fa 100644 --- a/.github/workflows/build-reference.yml +++ b/.github/workflows/build-reference.yml @@ -14,5 +14,14 @@ jobs: steps: - name: Checkout Source uses: actions/checkout@v2 + - name: Generate antora.yml + run: ./gradlew :spring-session-docs:generateAntora + - name: Push generated antora files to the spring-security-docs-generated + uses: JamesIves/github-pages-deploy-action@4.1.4 + with: + branch: "spring-session/main" # The branch the action should deploy to. + folder: "spring-session-docs/build/generateAntora" # The folder the action should deploy. + repository-name: "rwinch/spring-security-docs-generated" + token: ${{ secrets.GH_TOKEN_DISPATCH }} - name: Dispatch Build Request - run: ${GITHUB_WORKSPACE}/.github/actions/dispatch.sh 'rwinch/spring-reference' "$GH_TOKEN_DISPATCH" \ No newline at end of file + run: ${GITHUB_WORKSPACE}/.github/actions/dispatch.sh 'rwinch/spring-reference' "$GH_TOKEN_DISPATCH" diff --git a/spring-session-docs/antora.yml b/spring-session-docs/antora.yml index e39f2e14..8fafbdf5 100644 --- a/spring-session-docs/antora.yml +++ b/spring-session-docs/antora.yml @@ -3,26 +3,6 @@ title: Spring Session version: ~ display_version: 2.6 start_page: ROOT:index.adoc -asciidoc: - attributes: - page-pagination: true - idprefix: '' - idseparator: '-' - download-url: "https://github.com/spring-projects/spring-session/archive/main.zip" - gh-samples-url: "https://github.com/spring-projects/spring-session/tree/main/spring-session-samples/" - samples-dir: "example$spring-session-samples/" - session-jdbc-main-resources-dir: "example$session-jdbc-main-resources-dir/" - docs-test-dir: "example$java/" - websocketdoc-test-dir: 'example$java/docs/websocket/' - docs-test-resources-dir: "example$resources/" - indexdoc-tests: "example$java/docs/IndexDocTests.java" - lettuce-version: 6.1.2.RELEASE - hazelcast-version: 3.12.12 - spring-boot-version: 2.4.5 - spring-data-redis-version: 2.5.1 - spring-framework-version: 5.3.7 - spring-security-version: 5.5.0 - spring-session-version: 2.6.0-SNAPSHOT nav: diff --git a/spring-session-docs/modules/ROOT/nav.adoc b/spring-session-docs/modules/ROOT/nav.adoc index 9e9cc5ec..ba0c1121 100644 --- a/spring-session-docs/modules/ROOT/nav.adoc +++ b/spring-session-docs/modules/ROOT/nav.adoc @@ -1,5 +1,14 @@ * xref:whats-new.adoc[What's New] * xref:samples.adoc[Samples & Guides (Start Here)] +** Boot Samples +* xref:guides/boot-redis.adoc[HttpSession with Redis] +* xref:guides/boot-jdbc.adoc[HttpSession with JDBC] +* {gh-samples-url}spring-session-sample-boot-hazelcast[HttpSession with Hazelcast] +* xref:guides/boot-findbyusername.adoc[Find by Username] +* xref:guides/boot-websocket.adoc[WebSockets] +* {gh-samples-url}spring-session-sample-boot-webflux[WebFlux] +** Java Configuration +** XML Configuration * xref:modules.adoc[Modules] * xref:http-session.adoc[HttpSession Integration] * xref:web-socket.adoc[WebSocket Integration] diff --git a/spring-session-docs/spring-session-docs.gradle b/spring-session-docs/spring-session-docs.gradle index 76b96569..fef4b5da 100644 --- a/spring-session-docs/spring-session-docs.gradle +++ b/spring-session-docs/spring-session-docs.gradle @@ -36,6 +36,44 @@ sourceSets { def versions = dependencyManagement.managedVersions + +tasks.register("generateAntora") { + group = "Documentation" + description = "Generates the antora.yml for dynamic properties" + doLast { + def dollar = '$' + def ghTag = snapshotBuild ? 'main' : project.version + def ghUrl = "https://github.com/spring-projects/spring-session/tree/$ghTag" + def outputFile = new File("$buildDir/generateAntora/antora.yml") + outputFile.getParentFile().mkdirs() + outputFile.createNewFile() + outputFile.setText("""name: '' +title: Spring Session +version: ~ +display_version: 2.6 +start_page: ROOT:index.adoc +asciidoc: + attributes: + download-url: "https://github.com/spring-projects/spring-session/archive/${ghTag}.zip" + gh-samples-url: "$ghUrl/spring-session-samples/" + samples-dir: "example${dollar}spring-session-samples/" + session-jdbc-main-resources-dir: "example${dollar}session-jdbc-main-resources-dir/" + docs-test-dir: "example${dollar}java/" + websocketdoc-test-dir: 'example${dollar}java/docs/websocket/' + docs-test-resources-dir: "example${dollar}resources/" + indexdoc-tests: "example${dollar}java/docs/IndexDocTests.java" + spring-session-version: ${project.version} + version-milestone: $milestoneBuild + version-release: $releaseBuild + version-snapshot: $snapshotBuild + spring-boot-version: ${project.springBootVersion} + spring-data-redis-version: ${versions['org.springframework.data:spring-data-redis']} + spring-framework-version: ${versions['org.springframework:spring-core']} + spring-security-version: ${versions['org.springframework.security:spring-security-core']} +""") + } +} + asciidoctorPdf { clearSources() sources { @@ -77,8 +115,6 @@ asciidoctorj { 'docinfodir@': "." } -println asciidoctorj.attributes - repositories { maven { url "https://repo.spring.io/release" } }