Lal/add coal config map volumes prod 14991 #2894
Workflow file for this run
This file contains hidden or 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: Documentation | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - '*' | |
| - '!*-test' | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| branches: [ main ] | |
| jobs: | |
| generate_and_push_doc_for_openapi: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| # Fetch all tags since Gradle project version is built upon SCM | |
| fetch-depth: 0 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '23' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| with: | |
| gradle-version: '8.14' | |
| cache-disabled: true | |
| - name: Generate Markdown documentation | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: ./gradlew openApiMarkdownGenerate | |
| - name: Generate UML documentation | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: ./gradlew openApiUmlGenerate | |
| - name: Set Git identity | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| run: | | |
| git config --global user.email "[email protected]" | |
| git config --global user.name "$GITHUB_ACTOR" | |
| - name: Push generated documentation if needed | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| run: | | |
| git fetch --prune | |
| git pull --rebase --autostash | |
| if [[ `git status --porcelain` ]]; then | |
| git checkout -b api_documentation | |
| git add doc/ openapi/plantuml/ | |
| git commit -m "chore(docs): Update generated documentation" \ | |
| -m "Co-authored-by: csmplatform <[email protected]>" | |
| git push --set-upstream origin api_documentation | |
| gh pr create -B main -H api_documentation --title 'Merge api_documentation into main' --body 'Created by Github action' | |
| fi | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |