Caching is hard
parent
a8a10c0f35
commit
cc4192817b
|
@ -11,13 +11,13 @@ runs:
|
|||
cache-name: prod-build
|
||||
key-1: ${{ env.node_version }}-${{ hashFiles('yarn.lock') }}
|
||||
key-2: ${{ hashFiles('apps/web/next.config.js') }}
|
||||
key-3: ${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
|
||||
with:
|
||||
with:
|
||||
path: |
|
||||
apps/web/.next
|
||||
node_modules/.cache/turbo
|
||||
${{ github.workspace }}/apps/web/.next/cache
|
||||
**/.turbo/**
|
||||
**/dist/**
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ github.sha }}
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ env.key-3 }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-
|
||||
${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-
|
||||
${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ env.key-3 }}-
|
||||
|
|
|
@ -49,6 +49,9 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/yarn-install
|
||||
- uses: ./.github/actions/cache-db
|
||||
with:
|
||||
DATABASE_URL: ${{ env.DATABASE_URL }}
|
||||
- uses: ./.github/actions/yarn-build
|
||||
with:
|
||||
# GitHub Composite actions cannot read secrets, we have to pass them in here
|
||||
|
@ -80,6 +83,3 @@ jobs:
|
|||
NEXT_PUBLIC_IS_E2E: ${{ env.NEXT_PUBLIC_IS_E2E }}
|
||||
TURBO_TOKEN: ${{ env.TURBO_TOKEN }}
|
||||
TURBO_TEAM: ${{ env.TURBO_TEAM }}
|
||||
- uses: ./.github/actions/cache-db
|
||||
with:
|
||||
DATABASE_URL: ${{ env.DATABASE_URL }}
|
||||
|
|
Loading…
Reference in New Issue