Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

ci: setup cache for yarn

himself6593fd8aedb3ba
diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml
index d9411955ef..6ff6420e4b 100644
--- a/.github/actions/setup-node/action.yml
+++ b/.github/actions/setup-node/action.yml
@@ -29,6 +29,19 @@ runs:
shell: bash
run: node scripts/module-resolve/ci.cjs
+ - name: Get yarn cache directory path
+ id: yarn-cache-dir-path
+ shell: bash
+ run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
+
+ - uses: actions/cache@v3
+ id: yarn-cache
+ with:
+ path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
+ key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-yarn-
+
- name: yarn install
if: ${{ inputs.package-install == 'true' }}
continue-on-error: true