From a1abf77467a33b80fcbc011a0b387aa3d90e915f Mon Sep 17 00:00:00 2001 From: Saptak S Date: Sat, 9 Nov 2024 16:21:20 +0530 Subject: [PATCH] Replaces the build action --- .github/workflows/eleventy_build.yml | 16 ++++++++++++---- package.json | 3 +++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/eleventy_build.yml b/.github/workflows/eleventy_build.yml index 4c342e5..685352e 100644 --- a/.github/workflows/eleventy_build.yml +++ b/.github/workflows/eleventy_build.yml @@ -9,11 +9,19 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@main - - name: Build - uses: TartanLlama/actions-eleventy@v1.3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 with: - install_dependencies: true - args: --pathprefix 2023 + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Install packages + run: npm ci + + - name: Run npm build + run: npm run build + - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: diff --git a/package.json b/package.json index f4257e7..16d2f8c 100644 --- a/package.json +++ b/package.json @@ -1,4 +1,7 @@ { + "scripts": { + "build": "npx @11ty/eleventy" + }, "devDependencies": { "@11ty/eleventy": "2.0.1", "markdown-it": "^14.1.0"