DEV Community

Discussion on: Caching dependencies to speed up workflows in GitHub Actions

Collapse
 
fabianaasara profile image
Fabiana Asara

If you are using setup-node actions in your workflow it caches dependencies using actions/cache under the hood so that you don't need to add all of that in your code.
Caching is turned off by default but you can enable it adding the cache input parameter:

steps:
     - name: Setup node
        uses: actions/setup-node@v3
        with:
          node-version: '16'
          cache: 'npm'
Enter fullscreen mode Exit fullscreen mode