Add Azure Pipelines example to no-cache docs (#22708)

I added this in to my own pipeline to fix the no-cache error and thought it may be of use to others.
This commit is contained in:
Chris Meagher 2021-03-03 09:47:19 +00:00 committed by GitHub
parent 5b479b609a
commit bdc20c2657
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -111,3 +111,15 @@ Using Heroku's [custom cache](https://devcenter.heroku.com/articles/nodejs-suppo
```javascript
"cacheDirectories": [".next/cache"]
```
#### Azure Pipelines
Using Azure Pipelines' [Cache task](https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/cache), add the following task to your pipeline yaml file somewhere prior to the task that executes `next build`:
```yaml
- task: Cache@2
displayName: 'Cache .next/cache'
inputs:
key: next | $(Agent.OS) | yarn.lock
path: '$(System.DefaultWorkingDirectory)/.next/cache'
```