Skip to content

Commit

Permalink
Use the cache action to cache yarn dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
elchininet committed Jan 30, 2024
1 parent 6e3902d commit 73db7f6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ jobs:
node-version: '18'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: dependencies-v1-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- name: Publish
run: |
yarn install --frozen-lockfile --ignore-scripts --prefer-offline
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ jobs:
with:
node-version: '18'
cache: 'yarn'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: dependencies-v1-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- name: Install
run: yarn install --frozen-lockfile --ignore-scripts --prefer-offline
- name: Check TypeScript
Expand Down

0 comments on commit 73db7f6

Please sign in to comment.