Skip to content

Commit 5a31c61

Browse files
committed
Add docs-build for spring-boot
0 parents  commit 5a31c61

File tree

7 files changed

+3442
-0
lines changed

7 files changed

+3442
-0
lines changed

.github/workflows/deploy-docs.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Deploy Documentation
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., 1.0.x).
8+
required: false
9+
build-version:
10+
description: Enter the version being build (e.g. 1.0.3-SNAPSHOT)
11+
required: false
12+
push:
13+
branches: docs-build
14+
permissions: read-all
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@v4
22+
- name: Setup Node
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
- name: Setup NPM
27+
run: npm ci
28+
- name: Run Antora
29+
env:
30+
ALGOLIA_APP_ID: 244V8V9FGG
31+
ALGOLIA_API_KEY: 82c7ead946afbac3cf98c32446154691
32+
ALGOLIA_INDEX_NAME': spring-boot-docs
33+
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
34+
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
35+
REFERENCE: ${{ github.event.inputs.build-refname }}
36+
BUILD_VERSION: ${{ github.event.inputs.build-refname }}
37+
run: npx antora antora-playbook.yml --stacktrace --fetch
38+
- name: Sync Documentation
39+
uses: spring-io/spring-doc-actions/[email protected]
40+
with:
41+
dry-run: true
42+
docs-username: ${{ secrets.DOCS_USERNAME }}
43+
docs-host: ${{ secrets.DOCS_HOST }}
44+
docs-ssh-key: ${{ secrets.DOCS_SSH_KEY }}
45+
docs-ssh-host-key: ${{ secrets.DOCS_SSH_HOST_KEY }}
46+
httpdocs-path: /spring-boot/antora/reference
47+
- name: Bust Cloudflare Cache
48+
uses: spring-io/spring-doc-actions/[email protected]
49+
with:
50+
context-root: spring-boot
51+
cloudflare-zone-id: ${{ secrets.CLOUDFLARE_ZONE_ID }}
52+
cloudflare-cache-token: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
.vscode
3+
build

.npmrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fund=false
2+
lockfile-version=3
3+
omit=optional

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v20.11.1

antora-playbook.yml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
antora:
2+
extensions:
3+
- require: '@antora/atlas-extension'
4+
- require: '@springio/antora-extensions/latest-version-extension'
5+
- require: '@springio/antora-extensions/partial-build-extension'
6+
- require: '@springio/antora-extensions/publish-docsearch-config-extension'
7+
- require: '@springio/antora-extensions/static-page-extension'
8+
- require: '@springio/antora-xref-extension'
9+
- require: '@springio/antora-zip-contents-collector-extension'
10+
version_file: gradle.properties
11+
username: ${env.ARTIFACTORY_USERNAME}"
12+
password: ${env.ARTIFACTORY_PASSWORD}"
13+
locations:
14+
- url: https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-docs/${version}/spring-boot-docs-${version}-${name}-${classifier}.zip
15+
for-version-type: [snapshot]
16+
- url: https://repo.spring.io/milestone/org/springframework/boot/spring-boot-docs/${version}/spring-boot-docs-${version}-${name}-${classifier}.zip
17+
for-version-type: [milestone, rc]
18+
- url: https://repo.spring.io/release/org/springframework/boot/spring-boot-docs/${version}/spring-boot-docs-${version}-${name}-${classifier}.zip
19+
for-version-type: [release]
20+
# The root component extension must be last!
21+
- require: '@springio/antora-extensions/root-component-extension'
22+
root_component_name: spring-boot
23+
site:
24+
title: Spring Boot
25+
url: https://docs.spring.io/spring-boot/documentation
26+
robots: allow
27+
content:
28+
sources:
29+
- url: https://github.com/spring-projects/spring-boot
30+
branches:
31+
- 'main'
32+
- '*({0..9}).*({0..9}).x'
33+
- '!{0..2}.*'
34+
- '!3.{0..2}.*'
35+
tags:
36+
- 'v*.*.*'
37+
- '!v{0..2}*'
38+
- '!v3.{0..2}.*'
39+
- '!v3.3.0-M1'
40+
- '!v3.3.0-M2'
41+
start_paths:
42+
- spring-boot-project/spring-boot-docs/src/docs/antora
43+
- spring-boot-project/spring-boot-actuator-autoconfigure/src/docs/antora
44+
- spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/antora
45+
- spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/antora
46+
version: unspecified
47+
asciidoc:
48+
sourcemap: true
49+
attributes:
50+
chomp: all
51+
hide-uri-scheme: '@'
52+
page-pagination: ''
53+
page-stackoverflow-url: https://stackoverflow.com/tags/spring-boot
54+
tabs-sync-option: '@'
55+
extensions:
56+
- '@asciidoctor/tabs'
57+
- '@springio/asciidoctor-extensions'
58+
- '@springio/asciidoctor-extensions/configuration-properties-extension'
59+
- '@springio/asciidoctor-extensions/section-ids-extension'
60+
urls:
61+
latest_version_segment: ''
62+
latest_version_segment_strategy: redirect:to
63+
redirect_facility: httpd
64+
runtime:
65+
log:
66+
failure_level: warn
67+
ui:
68+
bundle:
69+
url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.4.11/ui-bundle.zip

0 commit comments

Comments
 (0)