From 633f6a40e202a023471c58c09f05a92ec2130c93 Mon Sep 17 00:00:00 2001 From: Spedon <70063177+Sped0n@users.noreply.github.com> Date: Fri, 23 Feb 2024 16:13:46 +0800 Subject: [PATCH] ci: update actions to resolve github's complain about deprecated Node.js v16 env (#285) * ci: update the action to utilize Node.js version 20 * ci: update key for Hugo action to include 'resources' folder --- .github/workflows/build.yml | 10 +++++----- .github/workflows/eslint.yml | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2f468d5..8141b63 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,13 +50,13 @@ jobs: token: ${{ secrets.PAT }} - name: Setup Hugo - uses: peaceiris/actions-hugo@v2 + uses: peaceiris/actions-hugo@v2.6.0 with: hugo-version: '0.114.0' extended: true - name: Setup pnpm - uses: pnpm/action-setup@v2 + uses: pnpm/action-setup@v3 with: version: 8 @@ -65,17 +65,17 @@ jobs: run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - name: Setup pnpm cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: ${{ runner.os }}-pnpm-store- - name: Setup hugo cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ./exampleSite/resources - key: ${{ runner.os }}-hugo-${{ hashFiles('./exampleSite') }} + key: ${{ runner.os }}-hugo-${{ hashFiles('./exampleSite/resources') }} restore-keys: ${{ runner.os }}-hugo- - name: Install dependencies diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 35da55b..8a337ec 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -22,7 +22,7 @@ jobs: token: ${{ secrets.PAT }} - name: Setup pnpm - uses: pnpm/action-setup@v2 + uses: pnpm/action-setup@v3 with: version: 8 @@ -31,7 +31,7 @@ jobs: run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - name: Setup pnpm cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}