From 85c2eabe9ae36c6421f0ddbd936b89a2bfd3e7ee Mon Sep 17 00:00:00 2001 From: DongjaJ Date: Mon, 16 Dec 2024 00:04:07 +0900 Subject: [PATCH 1/3] chore(.github/workflows): update actions version --- .github/workflows/ci.yml | 15 ++++++++------- .github/workflows/deploy.yml | 20 ++++++++++---------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 671e5c1..49afcd9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,17 +11,17 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Detect package manager id: detect-package-manager uses: ./.github/actions/detect-package-manager - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: "16" + node-version: '20' cache: ${{ steps.detect-package-manager.outputs.manager }} - name: Setup Pages - uses: actions/configure-pages@v2 + uses: actions/configure-pages@v4 with: # Automatically inject basePath in your Next.js configuration file and disable # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized). @@ -29,7 +29,7 @@ jobs: # You may remove this line if you want to manage the configuration yourself. static_site_generator: next - name: Restore cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | .next/cache @@ -43,10 +43,11 @@ jobs: - name: Build with Next.js run: ${{ steps.detect-package-manager.outputs.manager }} run build - name: Static HTML export with Next.js + # In versions of Next.js 13.3.0 and later, the next export command is no longer used. Instead, static exports can only be done with the next build. Therefore, the following steps may need to be removed or modified run: ${{ steps.detect-package-manager.outputs.runner }} next export - name: Optimize all static images after the Next.js static export - run: ${{ steps.detect-package-manager.outputs.runner }} next-image-export-optimizer + run: ${{ steps.detect-package-manager.outputs.runner }} next-image-export-optimizer - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v3 with: path: ./out diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8b9ab2a..064bf85 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,7 +7,7 @@ name: Deploy Next.js site to Pages on: # Runs on pushes targeting the default branch push: - branches: ["main"] + branches: ['main'] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -20,7 +20,7 @@ permissions: # Allow one concurrent deployment concurrency: - group: "pages" + group: 'pages' cancel-in-progress: true jobs: @@ -29,17 +29,17 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Detect package manager id: detect-package-manager uses: ./.github/actions/detect-package-manager - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: "16" + node-version: '20' cache: ${{ steps.detect-package-manager.outputs.manager }} - name: Setup Pages - uses: actions/configure-pages@v2 + uses: actions/configure-pages@v4 with: # Automatically inject basePath in your Next.js configuration file and disable # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized). @@ -47,7 +47,7 @@ jobs: # You may remove this line if you want to manage the configuration yourself. static_site_generator: next - name: Restore cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | .next/cache @@ -63,9 +63,9 @@ jobs: - name: Static HTML export with Next.js run: ${{ steps.detect-package-manager.outputs.runner }} next export - name: Optimize all static images after the Next.js static export - run: ${{ steps.detect-package-manager.outputs.runner }} next-image-export-optimizer + run: ${{ steps.detect-package-manager.outputs.runner }} next-image-export-optimizer - name: Upload artifact - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v3 with: path: ./out @@ -79,4 +79,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v1 + uses: actions/deploy-pages@v4 From e6dc18b497ed1d15fc6c231b4969eed25f5d79f9 Mon Sep 17 00:00:00 2001 From: DongjaJ Date: Mon, 16 Dec 2024 00:05:43 +0900 Subject: [PATCH 2/3] chore(.nvmrc): add .nvmrc --- .nvmrc | 1 + 1 file changed, 1 insertion(+) create mode 100644 .nvmrc diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..2edeafb --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +20 \ No newline at end of file From 4e3e3604be7c6299912e956d5c4e7d24070bf5e2 Mon Sep 17 00:00:00 2001 From: DongjaJ Date: Mon, 16 Dec 2024 00:06:05 +0900 Subject: [PATCH 3/3] chore(.github/workflows): update actions/setup-node to use 'node-version-file' instead of 'node-version --- .github/workflows/ci.yml | 2 +- .github/workflows/deploy.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49afcd9..7407832 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: '20' + node-version-file: '.nvmrc' cache: ${{ steps.detect-package-manager.outputs.manager }} - name: Setup Pages uses: actions/configure-pages@v4 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 064bf85..d03155c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -36,7 +36,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: '20' + node-version-file: '.nvmrc' cache: ${{ steps.detect-package-manager.outputs.manager }} - name: Setup Pages uses: actions/configure-pages@v4