From 1d3ddfa26a89b1bd3ebd8a2c467510aa09d59951 Mon Sep 17 00:00:00 2001 From: Hugo van Rijswijk Date: Thu, 30 Nov 2023 16:56:45 +0100 Subject: [PATCH] chore: add docusaurus cache to CI cache --- .github/workflows/ci.yml | 11 +++++++++++ .github/workflows/deploy.yml | 2 ++ 2 files changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96943ab7d..38b0b329c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,17 @@ jobs: # Use same version of node for netlify and CI build node-version-file: '.nvmrc' cache: 'npm' + - name: Docusaurus cache + uses: actions/cache@v3 + with: + path: | + .docusaurus + node_modules/.cache + key: ${{ runner.os }}-docusaurus-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} + # If source files changed but packages didn't, rebuild from a prior cache. + restore-keys: | + ${{ runner.os }}-docusaurus-${{ hashFiles('**/package-lock.json') }}- + ${{ runner.os }}-docusaurus- - run: npm ci - name: Lint ๐Ÿงถ run: npm run lint diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index db4be27e3..572b78a28 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -42,10 +42,12 @@ jobs: with: path: | .docusaurus + node_modules/.cache key: ${{ runner.os }}-docusaurus-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} # If source files changed but packages didn't, rebuild from a prior cache. restore-keys: | ${{ runner.os }}-docusaurus-${{ hashFiles('**/package-lock.json') }}- + ${{ runner.os }}-docusaurus- - run: npm ci - name: Build ๐Ÿ—๏ธ run: npm run build