From e2b38f66edf7658fa22f9cf214b61df17f18339a Mon Sep 17 00:00:00 2001 From: Muhammad Ahsan Ayaz <9844254+AhsanAyaz@users.noreply.github.com> Date: Mon, 28 Aug 2023 10:56:24 +0200 Subject: [PATCH 1/2] fix(ci): fix prettier fixed prettier for CI builds failing due to node 12.x updated the github action setup-node to latest --- .github/workflows/deploy.yml | 4 ++-- .github/workflows/prettier.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 74c7ac0252..ceb6bd8e60 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -22,9 +22,9 @@ jobs: persist-credentials: false - name: Setup Node.js 🔧 - uses: actions/setup-node@v2 + uses: actions/setup-node@v3.8.1 with: - node-version: 14.x + node-version: 16.x - name: Update npm 🚀 run: npm install -g npm@latest diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index d5052f57f9..3bb803c806 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -13,9 +13,9 @@ jobs: with: persist-credentials: false - - uses: actions/setup-node@v2-beta + - uses: actions/setup-node@v3.8.1 with: - node-version: '12' + node-version: 16.x - name: Install Prettier run: npm install -g prettier From 66d750cc13549f0ede7654f9a05fb4d173e7b066 Mon Sep 17 00:00:00 2001 From: Muhammad Ahsan Ayaz <9844254+AhsanAyaz@users.noreply.github.com> Date: Mon, 28 Aug 2023 11:06:32 +0200 Subject: [PATCH 2/2] fix(ci): use npm script instead of global prettier --- .github/workflows/prettier.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 3bb803c806..07f05fd319 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -16,11 +16,12 @@ jobs: - uses: actions/setup-node@v3.8.1 with: node-version: 16.x - - - name: Install Prettier - run: npm install -g prettier - + + - name: Install 🔧 # Install dependencies + run: | + npm install + - name: Check Format run: | - prettier -c "./**/*.{js,css,json}" + npm run check-format