Skip to content

Commit

Permalink
fix: add option to upload pnpm_artifact in gh-pages format
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Jul 27, 2024
1 parent 1118db1 commit 8ae41ed
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/doxygen_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
outputs:
artifact_name:
description: "The artifact name (default: `artifact`)."
value: "artifact"
value: "doxygen"

jobs:
build_doxygen:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/image_artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
outputs:
artifact_name:
description: "The artifact name (default: `artifact`)."
value: "artifact"
value: "images"

jobs:
package-and-upload:
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/pnpm_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 }}

0 comments on commit 8ae41ed

Please sign in to comment.