diff --git a/.github/actions/cache-node/action.yml b/.github/actions/cache-node/action.yml index 70f6134..63a96d1 100644 --- a/.github/actions/cache-node/action.yml +++ b/.github/actions/cache-node/action.yml @@ -3,6 +3,9 @@ description: install and Cache Node Modules runs: using: composite steps: + - name: Timestamp 1 + run: echo "Before installing Node" $(date "+%F %T.%3N") + - name: Set up Node uses: actions/setup-node@v4 with: @@ -12,6 +15,9 @@ runs: yarn.lock ui/yarn.lock + - name: Timestamp 2 + run: echo "Before restoring top-level node modules" $(date "+%F %T.%3N") + - name: Cache top-level node modules id: top-node-modules uses: actions/cache@v4 @@ -19,6 +25,9 @@ runs: key: node_modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }} path: node_modules + - name: Timestamp 3 + run: echo "Before restoring ui node modules" $(date "+%F %T.%3N") + - name: Cache ui node modules id: ui-node-modules uses: actions/cache@v4 @@ -26,6 +35,22 @@ runs: key: node_modules-${{ runner.os }}-${{ hashFiles('ui/yarn.lock') }} path: ui/node_modules + - name: Timestamp 4 + run: echo "Before restoring next build cache" $(date "+%F %T.%3N") + + - 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('**/yarn.lock') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} + # If source files changed but packages didn't, rebuild from a prior cache. + restore-keys: | + ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}- + + - name: Timestamp 5 + run: echo "Before running yarn install" $(date "+%F %T.%3N") + - name: Install dependencies shell: bash run: |