From a4759e169b9862a7c11ebe0b881df28ae725a35c Mon Sep 17 00:00:00 2001 From: Chris Patterson Date: Sun, 6 Feb 2022 14:01:38 -0500 Subject: [PATCH] Changing GitHub Actions cache documentation (#28228) ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com> --- errors/no-cache.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/errors/no-cache.md b/errors/no-cache.md index caea73084f3ab..b3b0214ca31ff 100644 --- a/errors/no-cache.md +++ b/errors/no-cache.md @@ -80,7 +80,10 @@ Using GitHub's [actions/cache](https://github.com/actions/cache), add the follow ```yaml uses: actions/cache@v2 with: - path: ${{ github.workspace }}/.next/cache + # See here for caching with `yarn` https://github.com/actions/cache/blob/main/examples.md#node---yarn or you can leverage caching with actions/setup-node https://github.com/actions/setup-node + path: | + ~/.npm + ${{ github.workspace }}/.next/cache # Generate a new cache whenever packages or source files change. key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} # If source files changed but packages didn't, rebuild from a prior cache.