From 0ceae329d71096c932adf1d22fdb3d5f71ef19e0 Mon Sep 17 00:00:00 2001 From: MacRimi <123239993+MacRimi@users.noreply.github.com> Date: Fri, 14 Feb 2025 12:21:07 +0100 Subject: [PATCH] Update deploy.yml --- .github/workflows/deploy.yml | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f665421..89f746c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,26 +26,19 @@ jobs: with: node-version: "20" - - name: Get npm cache directory - id: npm-cache-dir - run: | - echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT - - - name: Cache dependencies - uses: actions/cache@v3 - with: - path: ${{ steps.npm-cache-dir.outputs.dir }} - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - name: Setup Pages uses: actions/configure-pages@v4 - name: Install dependencies run: | cd web - npm ci + if [ ! -f "package-lock.json" ]; then + echo "package-lock.json not found. Running npm install to generate it." + npm install + else + echo "package-lock.json found. Running npm ci." + npm ci + fi npm install @tailwindcss/typography - name: Build with Next.js @@ -69,4 +62,3 @@ jobs: id: deployment uses: actions/deploy-pages@v4 -