From 8ae41ed6dfc5e459ebc555dd8632fb7fdf2979c5 Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Sat, 27 Jul 2024 13:06:23 +0100 Subject: [PATCH] fix: add option to upload pnpm_artifact in gh-pages format --- .github/workflows/doxygen_build.yml | 2 +- .github/workflows/image_artifact.yml | 2 +- .github/workflows/pnpm_build.yml | 16 +++++++++++++--- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/doxygen_build.yml b/.github/workflows/doxygen_build.yml index 9459031..c839760 100644 --- a/.github/workflows/doxygen_build.yml +++ b/.github/workflows/doxygen_build.yml @@ -10,7 +10,7 @@ on: outputs: artifact_name: description: "The artifact name (default: `artifact`)." - value: "artifact" + value: "doxygen" jobs: build_doxygen: diff --git a/.github/workflows/image_artifact.yml b/.github/workflows/image_artifact.yml index 97c9c3a..caae1f2 100644 --- a/.github/workflows/image_artifact.yml +++ b/.github/workflows/image_artifact.yml @@ -10,7 +10,7 @@ on: outputs: artifact_name: description: "The artifact name (default: `artifact`)." - value: "artifact" + value: "images" jobs: package-and-upload: diff --git a/.github/workflows/pnpm_build.yml b/.github/workflows/pnpm_build.yml index 7439285..5ea215f 100644 --- a/.github/workflows/pnpm_build.yml +++ b/.github/workflows/pnpm_build.yml @@ -13,13 +13,17 @@ on: required: true type: string output_path: - description: "If specified, the output dir is uploaded to a key named `artifact`." + description: "The output path is uploaded to a key named `artifact`." required: false type: string + github_pages: + description: "Upload in format specific for Github Pages `actions/deploy-pages`." + type: boolean + default: false outputs: artifact_name: description: "The artifact name (default: `artifact`)." - value: "artifact" + value: "build" jobs: build: @@ -56,8 +60,14 @@ jobs: # tar -cvzf ${{ inputs.output_key }}.tar.gz ${{ inputs.output_path }} - name: Upload Artifact Dir - if: ${{ inputs.output_path }} + if: ${{ inputs.output_path && !inputs.github_pages }} uses: actions/upload-artifact@v4 with: path: ${{ inputs.output_path }} name: build + + - name: Upload GH Pages Artifact + if: ${{ inputs.output_path && inputs.github_pages }} + uses: actions/download-artifact@v5 + with: + path: ${{ inputs.output_path }}