mirror of
https://github.com/cloudflare/wrangler-action.git
synced 2024-11-25 03:14:46 +01:00
Merge pull request #245 from Cherry/fix/packageManager
docs: remove warning about packageManager and pnpm default
This commit is contained in:
commit
fd98a7c990
1 changed files with 16 additions and 5 deletions
21
README.md
21
README.md
|
@ -31,7 +31,6 @@ jobs:
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: cloudflare/wrangler-action@v3
|
uses: cloudflare/wrangler-action@v3
|
||||||
with:
|
with:
|
||||||
packageManager: pnpm # you can omit this if you use npm
|
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -53,10 +52,6 @@ jobs:
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
### packageManager
|
|
||||||
|
|
||||||
⚠️ you must specify package manager. If not specified GH action assumes you are using npm and other managers might be failing. For example pnpm will fail with: `Cannot read properties of null (reading 'matches')`
|
|
||||||
|
|
||||||
If you need to install a specific version of Wrangler to use for deployment, you can also pass the input `wranglerVersion` to install a specific version of Wrangler from NPM. This should be a [SemVer](https://semver.org/)-style version number, such as `2.20.0`:
|
If you need to install a specific version of Wrangler to use for deployment, you can also pass the input `wranglerVersion` to install a specific version of Wrangler from NPM. This should be a [SemVer](https://semver.org/)-style version number, such as `2.20.0`:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
@ -273,6 +268,22 @@ 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!"
|
||||||
|
|
Loading…
Reference in a new issue