diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 671e5c1a..74078328 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-file: '.nvmrc' 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 8b9ab2a6..d03155c6 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-file: '.nvmrc' 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 diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..2edeafb0 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +20 \ No newline at end of file