Skip to content

Commit

Permalink
Merge pull request #25 from ThatXliner/patch-1
Browse files Browse the repository at this point in the history
Add option to configure pnpm version
  • Loading branch information
Princesseuh authored Aug 29, 2023
2 parents 8ab2579 + e9a9ccf commit e3193ac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ For more information, please see our complete deployment guide—[Deploy your As
- `path` - Optional: the root location of your Astro project inside the repository.
- `node-version` - Optional: the specific version of Node that should be used to build your site. Defaults to `16`.
- `package-manager` - Optional: the Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. Accepted values: `npm`, `yarn`, `pnpm`, and `bun`.
- `pnpm-version` - Optional: If `package-manager` is set to `pnpm`, use this specific version. Defaults to `7.x.x`.
- `resolve-dep-from-path` - Optional: If the dependency file should be resolved from the root location of your Astro project. Defaults to `true`.

### Example workflow:
Expand Down Expand Up @@ -49,7 +50,8 @@ jobs:
# with:
# path: . # The root location of your Astro project inside the repository. (optional)
# node-version: 16 # The specific version of Node that should be used to build your site. Defaults to 16. (optional)
# package-manager: yarn # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
# package-manager: pnpm # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
# pnpm-version: 8.x.x # If `package-manager` is set to `pnpm`, use this specific version. Defaults to `7.x.x`. (optional)
# resolve-dep-from-path: false # If the dependency file should be resolved from the root location of your Astro project. Defaults to `true`. (optional)

deploy:
Expand Down
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ inputs:
description: "If not automatically detectable, you may specify your preferred package manager"
required: false
default: ""
pnpm-version:
description: "If package-manager is pnpm, use this specific version. Defaults to latest"
required: false
default: "7.x.x"
resolve-dep-from-path:
description: "If the dependency file is located inside the folder specified by path"
type: boolean
Expand Down Expand Up @@ -54,7 +58,7 @@ runs:
if: ${{ env.PACKAGE_MANAGER == 'pnpm' }}
uses: pnpm/[email protected]
with:
version: 7.x.x
version: ${{ inputs.pnpm-version }}

- name: Setup Bun
if: ${{ env.PACKAGE_MANAGER == 'bun' }}
Expand Down

0 comments on commit e3193ac

Please sign in to comment.