This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8f93b29
commit bbcbbe8
Showing
11 changed files
with
157 additions
and
16 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: API docs | ||
|
||
on: | ||
push: | ||
tags: ['[0-9]+.[0-9]+*'] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
api-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
path: code | ||
persist-credentials: false | ||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
cache: 'maven' | ||
- name: Build API docs | ||
run: mvn javadoc:javadoc -Dnotimestamp | ||
working-directory: code | ||
- name: Checkout pages | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: gh-pages | ||
path: pages | ||
- name: Deploy pages | ||
run: | | ||
SDK_VERSION_FOLDER=`echo "$SDK_VERSION" | awk --field-separator '.' '{print $1".x";}'` | ||
# Create .nojekyll if it doesn't exist yet | ||
touch .nojekyll | ||
mkdir -p "apidocs/$SDK_VERSION_FOLDER" | ||
rsync --quiet --archive --checksum --delete --exclude .git ../code/target/site/apidocs/ "apidocs/$SDK_VERSION_FOLDER/" | ||
if [ -e apidocs/latest ]; then rm -r apidocs/latest; fi | ||
pushd apidocs && ln -s "$SDK_VERSION_FOLDER" latest && popd | ||
git config user.email "$USER_EMAIL" | ||
git config user.name "$USER_NAME" | ||
git add --all . | ||
# Only commit when there are changes | ||
git diff --quiet && git diff --staged --quiet || git commit --message "Generated API docs for version ${SDK_VERSION}" | ||
git push | ||
shell: bash | ||
working-directory: pages | ||
env: | ||
SDK_VERSION: ${{ github.ref_name }} | ||
USER_EMAIL: ${{ github.event.pusher.email }} | ||
USER_NAME: ${{ github.event.pusher.name }} |
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
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
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
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
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
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
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
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
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
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