enriikke / gatsby-gh-pages-action

GitHub Action to build and deploy your Gatsby site to GitHub Pages ❤️🎩
MIT License
295 stars 62 forks source link

NPM Dependencies Cache support? #57

Open ashutoshsaboo opened 3 years ago

ashutoshsaboo commented 3 years ago

Hi, Thanks for creating this plugin, but i'm noticing high build times due to installing npm dependencies again and again. One alternative is to let go of this plugin and add separate cache/install/push steps - similar to those documented here: https://www.gatsbyjs.com/docs/how-to/previews-deploys-hosting/how-gatsby-works-with-github-pages/ .

However, since this plugin manages almost all of these individual steps easily. Is it possible to make use of github actions cache as well? Somewhat like do npm install only if there was a cache miss - similar to this: https://github.com/actions/cache/blob/main/examples.md#node---npm ?

If this plugin already has this support, do I need to add the cache npm step myself before calling this action in my workflow? Or does the plugin handle this out of the box?

Thanks! :)