Skip to content

Commit fb45a2f

Browse files
rwinchgregturn
authored andcommitted
Initial Docs Build.
See #2876
1 parent f0b6fc2 commit fb45a2f

File tree

9 files changed

+732
-5
lines changed

9 files changed

+732
-5
lines changed

.github/workflows/deploy-docs.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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 JDK 17
25+
uses: actions/setup-java@v3
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+
export BUILD_REFNAME=${{ github.event.inputs.build-refname }}
34+
echo "BUILD_REFNAME=$BUILD_REFNAME" >> $GITHUB_ENV
35+
export BUILD_VERSION=$(git cat-file --textconv FETCH_HEAD:pom.xml | python3 -c "import xml.etree.ElementTree as xml; from sys import stdin; print(xml.parse(stdin).getroot().find('{http://maven.apache.org/POM/4.0.0}version').text)")
36+
echo BUILD_VERSION=$BUILD_VERSION >> $GITHUB_ENV
37+
- name: Run Antora
38+
run: |
39+
./mvnw compile
40+
- name: Publish Docs
41+
uses: spring-io/spring-doc-actions/[email protected]
42+
with:
43+
docs-username: ${{ secrets.DOCS_USERNAME }}
44+
docs-host: ${{ secrets.DOCS_HOST }}
45+
docs-ssh-key: ${{ secrets.DOCS_SSH_KEY }}
46+
docs-ssh-host-key: ${{ secrets.DOCS_SSH_HOST_KEY }}
47+
site-path: target/site
48+
- name: Bust Cloudflare Cache
49+
uses: spring-io/spring-doc-actions/[email protected]
50+
with:
51+
context-root: spring-data-commons
52+
cloudflare-zone-id: ${{ secrets.CLOUDFLARE_ZONE_ID }}
53+
cloudflare-cache-token: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}

.gitignore

+20-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
1-
node
2-
node_modules
3-
target
4-
package*.json
1+
target/
2+
.settings/
3+
.project
4+
.classpath
5+
*.orig
6+
.springBeans
7+
.factorypath
8+
.sts4-cache
9+
.ant-targets-build.xml
10+
src/ant/.ant-targets-upload-dist.xml
11+
*.sonar4clipse*
12+
.DS_Store
513
*.iml
6-
*.idea
14+
*.ipr
15+
*.iws
16+
/.idea/
17+
*.graphml
18+
node_modules
19+
node/
20+
package-lock.json
21+
package.json

.mvn/wrapper/maven-wrapper.jar

47.2 KB
Binary file not shown.

.mvn/wrapper/maven-wrapper.properties

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#Thu Apr 06 16:16:22 CEST 2023
2+
distributionUrl=https\://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.1/apache-maven-3.9.1-bin.zip

README.adoc

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
= Spring Data Commons 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 Data Commons 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 on the docs-build branch and then viewing the site at `target/site/index.html`
12+
13+
[source,bash]
14+
----
15+
mvn exec:exec@antora
16+
----
17+
18+
== Building a Specific Branch
19+
20+
[source,bash]
21+
----
22+
mvn exec:exec@antora
23+
----

antora-playbook.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
antora:
2+
extensions:
3+
- '@springio/antora-extensions/partial-build-extension'
4+
- require: '@springio/antora-extensions/inject-collector-cache-config-extension'
5+
- '@antora/collector-extension'
6+
- '@antora/atlas-extension'
7+
- require: '@springio/antora-extensions/root-component-extension'
8+
root_component_name: 'data-commons'
9+
site:
10+
title: Spring Data Commons
11+
url: https://spring.io/spring-data-commons/reference
12+
robots: allow
13+
git:
14+
ensure_git_suffix: false
15+
content:
16+
sources:
17+
- url: https://github.com/spring-projects/spring-data-commons
18+
branches: [main]
19+
start_path: src/main/antora
20+
asciidoc:
21+
attributes:
22+
page-stackoverflow-url: https://stackoverflow.com/tags/spring-data-commons
23+
page-pagination: ''
24+
hide-uri-scheme: '@'
25+
tabs-sync-option: '@'
26+
extensions:
27+
- '@asciidoctor/tabs'
28+
- '@springio/asciidoctor-extensions'
29+
urls:
30+
latest_version_segment_strategy: redirect:to
31+
latest_version_segment: ''
32+
redirect_facility: httpd
33+
ui:
34+
bundle:
35+
url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.3.3/ui-bundle.zip
36+
snapshot: true
37+
runtime:
38+
log:
39+
failure_level: warn
40+
format: pretty

0 commit comments

Comments
 (0)