Skip to content

Update Docs

Update Docs #268

Workflow file for this run

name: Update Docs
on:
push:
branches:
- main
paths:
- 'docs/**'
release:
types: [published] # includes pre-release and regular releases, but does not include draft releases.
workflow_dispatch:
inputs:
committish:
description: Tag or branch of the docs to be created or updated. Using `main` will update the landing page. Using anything else will create or update a versioned copy of the docs.
required: true
default: main
jobs:
updateDocs:
runs-on: ubuntu-20.04
steps:
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d' --utc)" >> $GITHUB_OUTPUT
- uses: actions/checkout@v2
- run: |
git config user.name github-actions
git config user.email github-actions@github.com
- uses: actions/setup-java@v1
with:
java-version: 17
- uses: actions/cache@v2
id: mvn-cache
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-unified-${{ steps.date.outputs.date }}
# - name: Maven go offline
# id: mvn-offline
# if: steps.mvn-cache.outputs.cache-hit != 'true'
# run: ./mvnw compile dependency:go-offline
#
# - name: Mvn install # Need this when the version/directory/pom structure changes
# run: |
# ./mvnw \
# --batch-mode \
# --show-version \
# --threads 1.5C \
# --define maven.test.skip=true \
# --define maven.javadoc.skip=true \
# install
#
# - name: Remove SNAPSHOT # Needed for releases
# run: |
# if [[ -n "${{ github.event.release.tag_name }}" ]] ; then
# ./mvnw versions:set --batch-mode -DremoveSnapshot -DprocessAllModules
# fi
- name: Update Docs
run: |
if [[ -n "${{ github.event.release.tag_name }}" ]] ; then
./docs/src/main/asciidoc/ghpages.sh --version ${{ github.event.release.tag_name }} --destination . --build
elif [[ -n "${{ github.event.inputs.committish }}" ]] && [[ "${{ github.event.inputs.committish }}" != "main" ]] ; then
./docs/src/main/asciidoc/ghpages.sh --version ${{ github.event.inputs.committish }} --destination . --build
else
./docs/src/main/asciidoc/ghpages.sh --build
fi