diff --git a/errors/no-cache.md b/errors/no-cache.md index caea73084f3a..b3b0214ca31f 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.