Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Deploy Docs
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., 5.7.x).
required: false
push:
branches: docs-build
env:
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
permissions: read-all
jobs:
build:
if: github.repository_owner == 'spring-projects'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 5
- name: Set Up Gradle
uses: spring-io/spring-gradle-build-action@v2
with:
java-version: '17'
distribution: temurin
- name: Set up refname build
if: github.event.inputs.build-refname
run: |
git fetch --depth 1 https://github.com/$GITHUB_REPOSITORY ${{ github.event.inputs.build-refname }}
echo BUILD_REFNAME=${{ github.event.inputs.build-refname }} >> $GITHUB_ENV
echo BUILD_VERSION=$(git cat-file --textconv FETCH_HEAD:gradle.properties | sed -n '/^version=/ { s/^version=//;p }') >> $GITHUB_ENV
- name: Run Antora
run: ./gradlew antora
- name: Copy the cache to be included in the site
run: cp -rf build/antora/inject-collector-cache-config-extension/.cache build/site/
- name: Publish Docs
uses: spring-io/spring-doc-actions/[email protected]
with:
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 }}
- name: Bust Clouflare Cache
uses: spring-io/spring-doc-actions/[email protected]
with:
context-root: spring-graphql
cloudflare-zone-id: ${{ secrets.CLOUDFLARE_ZONE_ID }}
cloudflare-cache-token: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/.gradle/
/.idea/*
/.settings/
/.classpath
/.project
/build/
/node_modules/
/package-lock.json
/*.iml
/*.ipr
/*.iws
!/.idea/checkstyle-idea.xml
!/.idea/externalDependencies.xml
15 changes: 15 additions & 0 deletions .idea/checkstyle-idea.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
= Spring GraphQL Docs Build

You're currently viewing the Antora playbook branch.
The playbook branch hosts the docs build that is used to build and publish the production docs site.

The Spring GraphQL reference docs are built using https://antora.org[Antora].
This README covers how to build the docs in a software branch as well as how to build the production docs site locally.

== Building the Site

You can build the entire site by invoking the following and then viewing the site at `build/site/index.html`

[source,bash]
----
./gradlew antora
----

== Building a Specific Branch

You can build a specific branch and then viewing the branch specific site at `build/site/index.html`.

[source,bash]
----
./gradlew antora
----
43 changes: 43 additions & 0 deletions antora-playbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
antora:
extensions:
- '@springio/antora-extensions/partial-build-extension'
- require: '@springio/antora-extensions/latest-version-extension'
- require: '@springio/antora-extensions/inject-collector-cache-config-extension'
- '@antora/collector-extension'
- '@antora/atlas-extension'
- require: '@springio/antora-extensions/root-component-extension'
root_component_name: 'graphql'
site:
title: Spring GraphQL
url: https://docs.spring.io/spring-graphql/reference
robots: allow
git:
ensure_git_suffix: false
content:
sources:
- url: https://github.com/spring-projects/spring-graphql
# Refname matching:
# https://docs.antora.org/antora/latest/playbook/content-refname-matching/
branches: [ main,'({1..9}).+({0..9}).x', '!(1.{1..2}.x)' ]
tags: [ 'v({1..9}).+({0..9}).+({0..9})?(-{RC,M}+({0..9}))', '!(v1.{0..2}.+({0..9})?(-{RC,M}+({0..9})))' ]
start_path: spring-graphql-docs
asciidoc:
attributes:
page-stackoverflow-url: https://stackoverflow.com/tags/spring-graphql
page-pagination: ''
hide-uri-scheme: '@'
tabs-sync-option: '@'
extensions:
- '@asciidoctor/tabs'
- '@springio/asciidoctor-extensions'
urls:
latest_version_segment_strategy: redirect:to
latest_version_segment: ''
redirect_facility: httpd
ui:
bundle:
url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.3.3/ui-bundle.zip
snapshot: true
runtime:
log:
failure_level: warn
21 changes: 21 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
plugins {
id 'base'
id 'org.antora' version '1.0.0'
}

antora {
version = '3.2.0-alpha.2'
options = [clean: true, fetch: true, stacktrace: true]
environment = [
'ALGOLIA_API_KEY': '9d489079e5ec46dbb238909fee5c9c29',
'ALGOLIA_APP_ID': 'WB1FQYI187',
'ALGOLIA_INDEX_NAME': 'springgraphql',
]
dependencies = [
'@antora/atlas-extension': '1.0.0-alpha.1',
'@antora/collector-extension': '1.0.0-alpha.3',
'@asciidoctor/tabs': '1.0.0-beta.3',
'@springio/antora-extensions': '1.4.2',
'@springio/asciidoctor-extensions': '1.0.0-alpha.8',
]
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
group=org.springframework.graphql
description=Spring GraphQL Docs Site
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading