From 7f49d343c483f7f2f1e60aa51bf048cb2cb9b969 Mon Sep 17 00:00:00 2001 From: squaresmile Date: Wed, 23 Oct 2024 17:11:05 -0400 Subject: [PATCH] Added next build cache --- .github/workflows/build-deploy.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index ff2453597..ece2da08d 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -15,12 +15,12 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: "3.11.5" + python-version: "3.11" cache: "pip" - name: Install Python dependencies @@ -31,9 +31,18 @@ jobs: run: python generate-lookup.py - name: Set up Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: - node-version: "18.18.0" + node-version: "18" + + - name: Cache next build + uses: actions/cache@v4 + with: + path: | + ~/.npm + ${{ github.workspace }}/.next/cache + key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} + restore-keys: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}- - name: Install npm dependencies run: npm ci