Deploy docs #53
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
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'SDK API version' | |
required: true | |
name: Deploy docs | |
# Declare default permissions as read only. | |
permissions: read-all | |
jobs: | |
docs: | |
name: Build and release docs | |
permissions: | |
contents: write # for stefanzweifel/git-auto-commit-action to push code in repo | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: sdk | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: doc | |
ref: gh-pages | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Setup Graphviz | |
uses: ts-graphviz/setup-graphviz@c001ccfb5aff62e28bda6a6c39b59a7e061be5b9 | |
- run: ./gradlew -Pversion=${{ github.event.inputs.version }} alljavadoc | |
working-directory: sdk | |
- run: rsync -r sdk/build/docs/javadoc/ doc/javadoc | |
- uses: stefanzweifel/git-auto-commit-action@3d1b5e078a85df99db0cb2441cd4309b09d86253 | |
with: | |
repository: doc | |
commit_message: "Update javadoc" | |
commit_user_name: automation-commercetools | |
commit_user_email: [email protected] | |
commit_author: Auto Mation <[email protected]> |