From b55af9f89cc504172ab04f15275fd0be8ee84bea Mon Sep 17 00:00:00 2001 From: Arek Mytych Date: Thu, 23 Jan 2020 12:38:17 +0100 Subject: [PATCH 1/3] Add info on storing cache in GitHub Actions --- errors/no-cache.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/errors/no-cache.md b/errors/no-cache.md index 4c572f51237d6cc..0842fb2bc549a97 100644 --- a/errors/no-cache.md +++ b/errors/no-cache.md @@ -74,3 +74,14 @@ cache: - 'node_modules/**/*' # Cache `node_modules` for faster `yarn` or `npm i` - '.next/cache/**/*' # Cache Next.js for faster application rebuilds ``` + +**GitHub Actions** + +Use GitHub's [actions/cache](https://github.com/actions/cache), add the following step in your workflow file: + +``` +uses: actions/cache@v1 +with: + path: ${{ github.workspace }}/.next/cache + key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }} +``` From 7f68c996f1045f23c3dc42bb55a48fc6e7a4a8f1 Mon Sep 17 00:00:00 2001 From: Arek Mytych Date: Thu, 23 Jan 2020 20:28:28 +0100 Subject: [PATCH 2/3] Specify yaml for code formatting Co-Authored-By: Joe Haddad --- errors/no-cache.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/errors/no-cache.md b/errors/no-cache.md index 0842fb2bc549a97..14e4580888eef79 100644 --- a/errors/no-cache.md +++ b/errors/no-cache.md @@ -79,7 +79,7 @@ cache: Use GitHub's [actions/cache](https://github.com/actions/cache), add the following step in your workflow file: -``` +```yaml uses: actions/cache@v1 with: path: ${{ github.workspace }}/.next/cache From 484971c799809503a755ccddc03202a9ffc739b4 Mon Sep 17 00:00:00 2001 From: Arek Mytych Date: Thu, 23 Jan 2020 20:28:46 +0100 Subject: [PATCH 3/3] Fix wording Co-Authored-By: Joe Haddad --- errors/no-cache.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/errors/no-cache.md b/errors/no-cache.md index 14e4580888eef79..12c941ee4296c19 100644 --- a/errors/no-cache.md +++ b/errors/no-cache.md @@ -77,7 +77,7 @@ cache: **GitHub Actions** -Use GitHub's [actions/cache](https://github.com/actions/cache), add the following step in your workflow file: +Using GitHub's [actions/cache](https://github.com/actions/cache), add the following step in your workflow file: ```yaml uses: actions/cache@v1