The recent move to do config props generation only at docs generation time left the docs.yml broken as it requires the config props generator class to be compiled prior to running. This updates the './build-docs.sh' to include the package command as well as update the docs.yml to use the same script. Signed-off-by: Chris Bono <chris.bono@gmail.com>
47 lines
1.7 KiB
YAML
47 lines
1.7 KiB
YAML
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., main).
|
|
required: false
|
|
push:
|
|
branches: [ docs-build ]
|
|
permissions:
|
|
contents: write
|
|
jobs:
|
|
build:
|
|
if: github.repository_owner == 'spring-projects-experimental'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 5
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '17'
|
|
distribution: 'temurin'
|
|
cache: maven
|
|
- 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 }}
|
|
export BUILD_REFNAME=${{ github.event.inputs.build-refname }}
|
|
echo "BUILD_REFNAME=$BUILD_REFNAME" >> $GITHUB_ENV
|
|
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)")
|
|
echo BUILD_VERSION=$BUILD_VERSION >> $GITHUB_ENV
|
|
- name: Run Antora
|
|
run: |
|
|
./build-docs.sh
|
|
- name: Publish Docs
|
|
uses: spring-io/spring-doc-actions/rsync-antora-reference@v0.0.11
|
|
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 }}
|
|
site-path: spring-grpc-docs/target/antora/site
|