Update Docs #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Docs | |
concurrency: ci-aio-lib-java | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: ["Release Deploy"] | |
types: | |
- completed | |
jobs: | |
version: | |
if: (!github.event.workflow_run || github.event.workflow_run.conclusion == 'success') && github.repository == 'adobe/aio-lib-java' | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.store-version.outputs.version }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
ref: 'main' | |
fetch-depth: 0 | |
- name: Get Latest Tag | |
id: previoustag | |
uses: WyriHaximus/github-action-get-previous-tag@v1 | |
- name: Checkout tag | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: ${{ steps.previoustag.outputs.tag }} | |
- name: Store Version | |
id: store-version | |
run: echo "::set-output name=version::$(mvn -q help:evaluate -Dexpression=project.version -DforceStdout)" | |
generate-docs: | |
runs-on: ubuntu-latest | |
needs: version | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
ref: 'main' | |
- name: Setup JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
cache: maven | |
- name: Build JavaDocs | |
run: mvn clean process-resources -Pgenerate-site-docs,aemaacsDeps,aemaacs -Dproject.version=${{ needs.version.outputs.version }} | |
- name: Commit Docs | |
run: | | |
git config user.name "GitHub Actions" | |
git config user.email [email protected] | |
git add docs/apidocs | |
git add docs/index.md | |
git commit -m 'Updating Docs.' | |
git push |