From 9d7ee34d2cc026512ec05241d44d7b835f65c7d8 Mon Sep 17 00:00:00 2001 From: Arek Mytych Date: Thu, 23 Jan 2020 21:40:02 +0100 Subject: [PATCH] Add info on storing cache in GitHub Actions (#10231) * Add info on storing cache in GitHub Actions * Specify yaml for code formatting Co-Authored-By: Joe Haddad * Fix wording Co-Authored-By: Joe Haddad Co-authored-by: Joe Haddad --- errors/no-cache.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/errors/no-cache.md b/errors/no-cache.md index e6d96bfd32c68..2056b7c88b56d 100644 --- a/errors/no-cache.md +++ b/errors/no-cache.md @@ -75,6 +75,17 @@ cache: - '.next/cache/**/*' # Cache Next.js for faster application rebuilds ``` +**GitHub Actions** + +Using 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 + key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }} +``` + **Bitbucket Pipelines** Add or merge the following into your `bitbucket-pipelines.yml` at the top level (same level as `pipelines`):