Skip to content

Commit

Permalink
CI: Optimisations
Browse files Browse the repository at this point in the history
  • Loading branch information
dankelleher committed Sep 3, 2024
1 parent c2cbc88 commit 5915535
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/actions/cache-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,20 @@ runs:
key: node_modules-${{ runner.os }}-${{ hashFiles('ui/yarn.lock') }}
path: ui/node_modules

- name: Cache nextjs build cache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('ui/src/yarn.lock') }}-${{ hashFiles('ui/src/*.js', 'ui/src/*.jsx', 'ui/src/*.ts', 'ui/src/*.tsx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('ui/src/yarn.lock') }}-
- name: Install dependencies
shell: bash
run: |
echo "Before installing dependencies" $(date "+%F %T.%3N")
yarn --frozen-lockfile --network-concurrency 2
(cd ui && yarn --frozen-lockfile --network-concurrency 2)
echo "After installing dependencies" $(date "+%F %T.%3N")
echo "After installing dependencies" $(date "+%F %T.%3N")

0 comments on commit 5915535

Please sign in to comment.