From 99a716ccaaf53b0e451fb65996b5b2d83e857b50 Mon Sep 17 00:00:00 2001 From: Ben Woo <30431861+benwoo1110@users.noreply.github.com> Date: Thu, 14 Nov 2024 13:38:42 +0800 Subject: [PATCH] latest boolean --- .github/workflows/dispatch.javadoc.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dispatch.javadoc.yml b/.github/workflows/dispatch.javadoc.yml index 7711830e..891e8c11 100644 --- a/.github/workflows/dispatch.javadoc.yml +++ b/.github/workflows/dispatch.javadoc.yml @@ -6,6 +6,9 @@ on: target_tag: description: 'Version to generate javadoc' required: true + replace_latest: + description: 'Should this release replace the latest folder' + type: boolean jobs: javadocs: @@ -29,12 +32,16 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 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: | 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/${{ inputs.target_tag }} - name: Deploy javadoc to gh pages uses: JamesIves/github-pages-deploy-action@v4