From 3b983883003e6b9aa0a873c3b7b689b78dd06971 Mon Sep 17 00:00:00 2001 From: Andra Blaj Date: Fri, 27 Sep 2024 14:42:51 +0000 Subject: [PATCH] Try to fix CI --- .github/setup-node/action.yml | 22 ++++++++++++++++++++++ .github/workflows/main.yml | 3 --- 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 .github/setup-node/action.yml diff --git a/.github/setup-node/action.yml b/.github/setup-node/action.yml new file mode 100644 index 0000000..853b976 --- /dev/null +++ b/.github/setup-node/action.yml @@ -0,0 +1,22 @@ +name: setup-node +description: "Setup Node.js ⚙️ - Cache dependencies ⚡ - Install dependencies 🔧" +runs: + using: "composite" + steps: + - name: Setup Node.js ⚙️ + uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + + - name: Cache dependencies ⚡ + id: cache_dependencies + uses: actions/cache@v3 + with: + path: node_modules + key: node-modules-${{ hashFiles('package-lock.json') }} + + - name: Install dependencies 🔧 + shell: bash + if: steps.cache_dependencies.outputs.cache-hit != 'true' + run: npm ci + \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7f218f1..d6c1b72 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,9 +41,6 @@ jobs: with: static_site_generator: next - - name: Install dependencies - run: npm install - - name: Build with Next.js 🏗️ run: npm run build