Skip to content

Commit

Permalink
Fix Lerna Example (#242)
Browse files Browse the repository at this point in the history
* Fix lerna example

* Fix yaml spacing
  • Loading branch information
Josh Gross authored and GitHub committed Apr 2, 2020
1 parent eb78578 commit f60097c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ See [Examples](examples.md) for a list of `actions/cache` implementations for us
- [Java - Gradle](./examples.md#java---gradle)
- [Java - Maven](./examples.md#java---maven)
- [Node - npm](./examples.md#node---npm)
- [Node - Lerna](./examples.md#node---lerna)
- [Node - Yarn](./examples.md#node---yarn)
- [OCaml/Reason - esy](./examples.md##ocamlreason---esy)
- [PHP - Composer](./examples.md#php---composer)
Expand Down
27 changes: 14 additions & 13 deletions examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
- [macOS and Ubuntu](#macos-and-ubuntu)
- [Windows](#windows)
- [Using multiple systems and `npm config`](#using-multiple-systems-and-npm-config)
- [Node - Yarn](#node---yarn)
- [Node - Lerna](#node---lerna)
- [Node - Yarn](#node---yarn)
- [OCaml/Reason - esy](#ocamlreason---esy)
- [PHP - Composer](#php---composer)
- [Python - pip](#python---pip)
Expand Down Expand Up @@ -168,6 +168,19 @@ For npm, cache files are stored in `~/.npm` on Posix, or `%AppData%/npm-cache` o
${{ runner.os }}-node-
```

## Node - Lerna

>Note this example uses the new multi-paths feature and is only available at `master`
```yaml
- name: restore lerna
uses: actions/cache@master
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
```

## Node - Yarn
The yarn cache directory will depend on your operating system and version of `yarn`. See https://yarnpkg.com/lang/en/docs/cli/cache/ for more info.

Expand All @@ -185,18 +198,6 @@ The yarn cache directory will depend on your operating system and version of `ya
${{ runner.os }}-yarn-
```
## Node - Lerna
```yaml
- name: restore lerna
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}
```
## OCaml/Reason - esy
Esy allows you to export built dependencies and import pre-built dependencies.
```yaml
Expand Down

0 comments on commit f60097c

Please sign in to comment.