- upgrade to Antora 3.2.0-alpha.2 - upgrade release-line-extension to 1.0.0-alpha.2 - add atlas-extension - add local autoconfig-partial-build extension - configure deploy-docs.yml workflow to detect and set up partial build - configure publish-docs.sh script to sync partial build
41 lines
1.6 KiB
YAML
41 lines
1.6 KiB
YAML
name: Deploy Docs
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
build-refname:
|
|
description: Enter git refname to build (e.g., 5.7.x).
|
|
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@v3
|
|
with:
|
|
fetch-depth: 5
|
|
- name: Set Up Gradle
|
|
uses: spring-io/spring-gradle-build-action@v1
|
|
with:
|
|
java-version: '17'
|
|
distribution: temurin
|
|
- name: Scrub Gradle Cache
|
|
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
|
|
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
|
|
run: |
|
|
rm -f /home/runner/.gradle/caches/modules-2/modules-2.lock
|
|
rm -f /home/runner/.gradle/caches/modules-2/gc.properties
|
|
- 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: Publish Docs
|
|
run: ${GITHUB_WORKSPACE}/.github/actions/publish-docs.sh "${{ secrets.DOCS_USERNAME }}@${{ secrets.DOCS_HOST }}" /opt/www/domains/spring.io/docs/htdocs/spring-security/reference/ "${{ secrets.DOCS_SSH_KEY }}" "${{ secrets.DOCS_SSH_HOST_KEY }}"
|