latest boolean

This commit is contained in:
Ben Woo 2024-11-14 13:38:42 +08:00 committed by GitHub
parent ecca904aef
commit 99a716ccaa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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: 'Should this release replace the latest folder'
type: boolean
jobs: jobs:
javadocs: javadocs:
@ -29,12 +32,16 @@ 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 version and latest folder - 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: | run: |
mkdir -p build/docs/javadoc-deploy/latest mkdir -p build/docs/javadoc-deploy/latest
mkdir -p build/docs/javadoc-deploy/${{ inputs.target_tag }}
cp -r build/docs/javadoc/* build/docs/javadoc-deploy/latest cp -r build/docs/javadoc/* build/docs/javadoc-deploy/latest
cp -r build/docs/javadoc/* build/docs/javadoc-deploy/${{ inputs.target_tag }}
- 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