mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-15 01:07:30 +08:00
Add docs-build for spring-boot
This commit is contained in:
commit
9a3f612575
52
.github/workflows/deploy-docs.yml
vendored
Normal file
52
.github/workflows/deploy-docs.yml
vendored
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
name: Deploy Documentation
|
||||||
|
run-name: ${{ format('{0} ({1})', github.workflow, github.event.inputs.build-refname || 'all') }}
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
build-refname:
|
||||||
|
description: Enter git refname to build (e.g., 1.0.x).
|
||||||
|
required: false
|
||||||
|
build-version:
|
||||||
|
description: Enter the version being build (e.g. 1.0.3-SNAPSHOT)
|
||||||
|
required: false
|
||||||
|
push:
|
||||||
|
branches: docs-build
|
||||||
|
permissions: read-all
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
if: github.repository_owner == 'spring-projects'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
- name: Setup NPM
|
||||||
|
run: npm ci
|
||||||
|
- name: Run Antora
|
||||||
|
env:
|
||||||
|
ALGOLIA_APP_ID: 244V8V9FGG
|
||||||
|
ALGOLIA_API_KEY: 82c7ead946afbac3cf98c32446154691
|
||||||
|
ALGOLIA_INDEX_NAME': spring-boot-docs
|
||||||
|
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
|
||||||
|
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
||||||
|
REFERENCE: ${{ github.event.inputs.build-refname }}
|
||||||
|
BUILD_VERSION: ${{ github.event.inputs.build-refname }}
|
||||||
|
run: npx antora antora-playbook.yml --stacktrace --fetch
|
||||||
|
- name: Sync Documentation
|
||||||
|
uses: spring-io/spring-doc-actions/rsync-antora-reference@v0.0.15
|
||||||
|
with:
|
||||||
|
dry-run: true
|
||||||
|
docs-username: ${{ secrets.DOCS_USERNAME }}
|
||||||
|
docs-host: ${{ secrets.DOCS_HOST }}
|
||||||
|
docs-ssh-key: ${{ secrets.DOCS_SSH_KEY }}
|
||||||
|
docs-ssh-host-key: ${{ secrets.DOCS_SSH_HOST_KEY }}
|
||||||
|
httpdocs-path: /spring-boot/antora/reference
|
||||||
|
- name: Bust Cloudflare Cache
|
||||||
|
uses: spring-io/spring-doc-actions/bust-cloudflare-antora-cache@v0.0.15
|
||||||
|
with:
|
||||||
|
context-root: spring-boot
|
||||||
|
cloudflare-zone-id: ${{ secrets.CLOUDFLARE_ZONE_ID }}
|
||||||
|
cloudflare-cache-token: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}
|
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
node_modules
|
||||||
|
.vscode
|
||||||
|
build
|
69
antora-playbook.yml
Normal file
69
antora-playbook.yml
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
antora:
|
||||||
|
extensions:
|
||||||
|
- require: '@antora/atlas-extension'
|
||||||
|
- require: '@springio/antora-extensions/latest-version-extension'
|
||||||
|
- require: '@springio/antora-extensions/partial-build-extension'
|
||||||
|
- require: '@springio/antora-extensions/publish-docsearch-config-extension'
|
||||||
|
- require: '@springio/antora-extensions/static-page-extension'
|
||||||
|
- require: '@springio/antora-xref-extension'
|
||||||
|
- require: '@springio/antora-zip-contents-collector-extension'
|
||||||
|
version_file: gradle.properties
|
||||||
|
username: ${env.ARTIFACTORY_USERNAME}"
|
||||||
|
password: ${env.ARTIFACTORY_PASSWORD}"
|
||||||
|
locations:
|
||||||
|
- url: https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-docs/${version}/spring-boot-docs-${version}-${name}-${classifier}.zip
|
||||||
|
for-version-type: [snapshot]
|
||||||
|
- url: https://repo.spring.io/milestone/org/springframework/boot/spring-boot-docs/${version}/spring-boot-docs-${version}-${name}-${classifier}.zip
|
||||||
|
for-version-type: [milestone, rc]
|
||||||
|
- url: https://repo.spring.io/release/org/springframework/boot/spring-boot-docs/${version}/spring-boot-docs-${version}-${name}-${classifier}.zip
|
||||||
|
for-version-type: [release]
|
||||||
|
# The root component extension must be last!
|
||||||
|
- require: '@springio/antora-extensions/root-component-extension'
|
||||||
|
root_component_name: spring-boot
|
||||||
|
site:
|
||||||
|
title: Spring Boot
|
||||||
|
url: https://docs.spring.io/spring-boot
|
||||||
|
robots: allow
|
||||||
|
content:
|
||||||
|
sources:
|
||||||
|
- url: https://github.com/spring-projects/spring-boot
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
- '*({0..9}).*({0..9}).x'
|
||||||
|
- '!{0..2}.*'
|
||||||
|
- '!3.{0..2}.*'
|
||||||
|
tags:
|
||||||
|
- 'v*.*.*'
|
||||||
|
- '!v{0..2}*'
|
||||||
|
- '!v3.{0..2}.*'
|
||||||
|
- '!v3.3.0-M1'
|
||||||
|
- '!v3.3.0-M2'
|
||||||
|
start_paths:
|
||||||
|
- spring-boot-project/spring-boot-docs/src/docs/antora
|
||||||
|
- spring-boot-project/spring-boot-actuator-autoconfigure/src/docs/antora
|
||||||
|
- spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/docs/antora
|
||||||
|
- spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/antora
|
||||||
|
version: unspecified
|
||||||
|
asciidoc:
|
||||||
|
sourcemap: true
|
||||||
|
attributes:
|
||||||
|
chomp: all
|
||||||
|
hide-uri-scheme: '@'
|
||||||
|
page-pagination: ''
|
||||||
|
page-stackoverflow-url: https://stackoverflow.com/tags/spring-boot
|
||||||
|
tabs-sync-option: '@'
|
||||||
|
extensions:
|
||||||
|
- '@asciidoctor/tabs'
|
||||||
|
- '@springio/asciidoctor-extensions'
|
||||||
|
- '@springio/asciidoctor-extensions/configuration-properties-extension'
|
||||||
|
- '@springio/asciidoctor-extensions/section-ids-extension'
|
||||||
|
urls:
|
||||||
|
latest_version_segment: ''
|
||||||
|
latest_version_segment_strategy: redirect:to
|
||||||
|
redirect_facility: httpd
|
||||||
|
runtime:
|
||||||
|
log:
|
||||||
|
failure_level: warn
|
||||||
|
ui:
|
||||||
|
bundle:
|
||||||
|
url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.4.11/ui-bundle.zip
|
3299
package-lock.json
generated
Normal file
3299
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
15
package.json
Normal file
15
package.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"scripts": {
|
||||||
|
"antora": "node npm/antora.js"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@antora/cli": "3.2.0-alpha.4",
|
||||||
|
"@antora/site-generator": "3.2.0-alpha.4",
|
||||||
|
"@antora/atlas-extension": "1.0.0-alpha.2",
|
||||||
|
"@springio/antora-extensions": "1.8.2",
|
||||||
|
"@springio/antora-xref-extension": "1.0.0-alpha.3",
|
||||||
|
"@springio/antora-zip-contents-collector-extension": "1.0.0-alpha.2",
|
||||||
|
"@asciidoctor/tabs": "1.0.0-beta.6",
|
||||||
|
"@springio/asciidoctor-extensions": "1.0.0-alpha.10"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user