👷 Add NextJS bundle analysis GitHub Action

This commit is contained in:
ajnart
2023-05-15 17:23:11 +09:00
parent 830adad22f
commit 96713f5223
3 changed files with 144 additions and 12 deletions

View File

@@ -56,17 +56,14 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- name: Restore NextJS cache
uses: actions/cache@v2
- name: Restore next build
uses: actions/cache@v3
id: restore-build-cache
env:
cache-name: cache-next-build
with:
# See here for caching with `yarn` https://github.com/actions/cache/blob/main/examples.md#node---yarn or you can leverage caching with actions/setup-node https://github.com/actions/setup-node
path: |
${{ github.workspace }}/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ 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 }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
path: .next/cache
key: ${{ runner.os }}-build-${{ env.cache-name }}
- run: yarn install --immutable