docs: add brief docs about packageManager

This commit is contained in:
James Ross 2024-03-26 00:31:15 +00:00
parent d5a1abb013
commit 0c36639f72
No known key found for this signature in database
GPG key ID: 49E8B07166BE49AB

View file

@ -268,6 +268,23 @@ The resulting output will look something like this:
https://<your_pages_site>.pages.dev https://<your_pages_site>.pages.dev
``` ```
### Using a different package manager
By default, this action will detect which package manager to use, based on the presence of a `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`, or `bun.lockb` file.
If you need to use a specific package manager for your application, you can set the `packageManager` input to `npm`, `yarn`, `pnpm`, or `bun`. You don't need to set this option unless you want to override the default behavior.
```yaml
jobs:
deploy:
steps:
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
packageManager: pnpm
```
## Troubleshooting ## Troubleshooting
### "I just started using Workers/Wrangler and I don't know what this is!" ### "I just started using Workers/Wrangler and I don't know what this is!"