From 7fe1118c121ca2daf8f580dcb78f35ef2a7950ab Mon Sep 17 00:00:00 2001 From: Koen van Meijeren Date: Sat, 25 Nov 2023 20:06:21 +0100 Subject: [PATCH] chore: :construction: Implement caching for npm packages --- .github/workflows/app.build.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/app.build.yml b/.github/workflows/app.build.yml index 601df33f..886ab7db 100644 --- a/.github/workflows/app.build.yml +++ b/.github/workflows/app.build.yml @@ -27,6 +27,15 @@ jobs: wp-username: ${{ secrets.WP_USERNAME }} wp-password: ${{ secrets.WP_PASSWORD }} + # See: https://stackoverflow.com/questions/55110729/how-do-i-cache-steps-in-github-actions + - name: Cache NPM dependencies + uses: actions/cache@v3 + with: + path: ~/.npm + key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.OS }}-npm-cache- + - name: Install dependencies run: npm install