Skip to content

Commit 6f9e20a

Browse files
committed
Add Antora based docs-build
1 parent dd49884 commit 6f9e20a

File tree

11 files changed

+1158
-0
lines changed

11 files changed

+1158
-0
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 53 additions & 0 deletions
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 antora
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-batch
52+
cloudflare-zone-id: ${{ secrets.CLOUDFLARE_ZONE_ID }}
53+
cloudflare-cache-token: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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
13+
*.iml
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

Lines changed: 2 additions & 0 deletions
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

.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

0 commit comments

Comments
 (0)