From bbd877a3ba59bdbe13fb6465d9d6e451c77bbc78 Mon Sep 17 00:00:00 2001 From: Eric Fennis Date: Mon, 1 Jul 2024 18:04:31 +0200 Subject: [PATCH] ci(pull-request): Fix workflows attempt #6 --- .github/workflows/pull-request.yml | 2 +- scripts/generateChangedIconsCommentMarkup.mjs | 4 ++-- scripts/updateContributors.mjs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 13c270baa..9328aedcb 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -48,7 +48,7 @@ jobs: - name: Install simple-git (safer and faster than installing all deps) run: npm install simple-git --global - name: Generate annotations - run: NODE_PATH=$(npm root -g) node ./scripts/updateContributors.mjs + run: node ./scripts/updateContributors.mjs env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} FETCH_DEPTH: ${{ github.event.pull_request.commits }} diff --git a/scripts/generateChangedIconsCommentMarkup.mjs b/scripts/generateChangedIconsCommentMarkup.mjs index a50f67681..a2a97df46 100644 --- a/scripts/generateChangedIconsCommentMarkup.mjs +++ b/scripts/generateChangedIconsCommentMarkup.mjs @@ -1,13 +1,13 @@ import fs from 'fs'; import path from 'path'; -import { parseSync } from 'svgson'; +import { parseSync } from '/usr/local/lib/node_modules/simple-git/svgson'; import { shuffleArray, readSvgDirectory, getCurrentDirPath, minifySvg, toPascalCase, -} from '@lucide/helpers'; +} from '../tools/build-helpers/main.mjs'; const currentDir = getCurrentDirPath(import.meta.url); const ICONS_DIR = path.resolve(currentDir, '../icons'); diff --git a/scripts/updateContributors.mjs b/scripts/updateContributors.mjs index 90dbe8c49..f475500f3 100644 --- a/scripts/updateContributors.mjs +++ b/scripts/updateContributors.mjs @@ -1,6 +1,6 @@ import fs from 'node:fs'; import path from 'path'; -import simpleGit from 'simple-git'; +import simpleGit from '/usr/local/lib/node_modules/simple-git'; import { Octokit } from '@octokit/rest'; import pMemoize from 'p-memoize';