Merge pull request #3124 from Multiverse/ben/javadoc-latest

Add latest dir for javadoc
This commit is contained in:
Jeremy Wood 2024-11-14 00:51:18 -05:00 committed by GitHub
commit 83b6236ed7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 29 additions and 5 deletions

View File

@ -6,6 +6,9 @@ on:
target_tag: target_tag:
description: 'Version to generate javadoc' description: 'Version to generate javadoc'
required: true required: true
replace_latest:
description: 'Replace the latest folder'
type: boolean
jobs: jobs:
javadocs: javadocs:
@ -29,11 +32,23 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_VERSION: ${{ inputs.target_tag }} GITHUB_VERSION: ${{ inputs.target_tag }}
- name: Copy javadoc to deploy folder
run: |
mkdir -p build/docs/javadoc-deploy/${{ inputs.target_tag }}
cp -r build/docs/javadoc/* build/docs/javadoc-deploy/${{ inputs.target_tag }}
- name: Copy javadoc to latest folder
if: inputs.replace_latest
run: |
mkdir -p build/docs/javadoc-deploy/latest
cp -r build/docs/javadoc/* build/docs/javadoc-deploy/latest
- name: Deploy javadoc to gh pages - name: Deploy javadoc to gh pages
uses: JamesIves/github-pages-deploy-action@v4 uses: JamesIves/github-pages-deploy-action@v4
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
folder: build/docs/javadoc folder: build/docs/javadoc-deploy
branch: javadoc branch: javadoc
target-folder: javadoc/${{ inputs.target_tag }} target-folder: javadoc
clean: false
commit-message: Deploy javadoc for ${{ inputs.target_tag }} commit-message: Deploy javadoc for ${{ inputs.target_tag }}

View File

@ -100,12 +100,21 @@ jobs:
GITHUB_VERSION: ${{ steps.release.outputs.publish_version }} GITHUB_VERSION: ${{ steps.release.outputs.publish_version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Copy javadoc to version and latest folder
if: steps.javadoc.outcome == 'success'
run: |
mkdir -p build/docs/javadoc-deploy/latest
mkdir -p build/docs/javadoc-deploy/${{ steps.release.outputs.tag_name }}
cp -r build/docs/javadoc/* build/docs/javadoc-deploy/latest
cp -r build/docs/javadoc/* build/docs/javadoc-deploy${{ steps.release.outputs.tag_name }}
- name: Deploy javadoc to gh pages - name: Deploy javadoc to gh pages
if: steps.javadoc.outcome == 'success' if: steps.javadoc.outcome == 'success'
uses: JamesIves/github-pages-deploy-action@v4 uses: JamesIves/github-pages-deploy-action@v4
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
folder: build/docs/javadoc folder: build/docs/javadoc-deploy
branch: javadoc branch: javadoc
target-folder: javadoc/${{ steps.release.outputs.tag_name }} target-folder: javadoc
clean: false
commit-message: Deploy javadoc for ${{ steps.release.outputs.tag_name }} commit-message: Deploy javadoc for ${{ steps.release.outputs.tag_name }}