Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javadoc with github action #3123

Merged
merged 2 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/dispatch.javadoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: 'Dispatch: Deploy Javadoc'

on:
workflow_dispatch:
inputs:
target_tag:
description: 'Version to generate javadoc'
required: true

jobs:
javadocs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.target_tag }}

- uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
cache: gradle

- name: build javadoc
uses: gradle/gradle-build-action@v2
with:
arguments: javadoc
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_VERSION: ${{ inputs.target_tag }}

- name: Deploy javadoc to gh pages
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
folder: build/docs/javadoc
branch: javadoc
target-folder: javadoc/${{ inputs.target_tag }}
commit-message: Deploy javadoc for ${{ inputs.target_tag }}
20 changes: 20 additions & 0 deletions .github/workflows/generic.github_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,23 @@ jobs:
file: build/libs/${{ inputs.plugin_name }}-${{ steps.release.outputs.publish_version }}.jar
asset_name: ${{ inputs.plugin_name }}-${{ steps.release.outputs.tag_name }}.jar
tag: ${{ steps.release.outputs.tag_name }}

- name: Generate javadoc
id: javadoc
if: steps.release.outputs.release_created == 'true' && steps.release.outputs.release_type == 'release'
uses: gradle/gradle-build-action@v2
with:
arguments: javadoc
env:
GITHUB_VERSION: ${{ steps.release.outputs.publish_version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Deploy javadoc to gh pages
if: steps.javadoc.outcome == 'success'
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
folder: build/docs/javadoc
branch: javadoc
target-folder: javadoc/${{ steps.release.outputs.tag_name }}
commit-message: Deploy javadoc for ${{ steps.release.outputs.tag_name }}
Loading