From fe2bbc4498f9e3fc5cbf3570911f59f8363383f6 Mon Sep 17 00:00:00 2001 From: CloudLun Date: Mon, 18 Mar 2024 16:52:50 -0400 Subject: [PATCH] changed the pathname --- .github/workflows/nextjs.yml | 22 +++++++++++----------- next.config.js | 4 +++- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index 5dba613..6450c04 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Detect package manager id: detect-package-manager run: | @@ -49,20 +49,20 @@ jobs: exit 1 fi - 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@v3 - with: + 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). # # You may remove this line if you want to manage the configuration yourself. - static_site_generator: next + # static_site_generator: next - name: Restore cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | .next/cache @@ -75,10 +75,10 @@ jobs: run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} - name: Build with Next.js run: ${{ steps.detect-package-manager.outputs.runner }} next build - - name: Static HTML export with Next.js - run: ${{ steps.detect-package-manager.outputs.runner }} next export + # - name: Static HTML export with Next.js + # run: ${{ steps.detect-packagmanager.outputs.runner }} next export - name: Upload artifact - uses: actions/upload-pages-artifact@v2 + uses: actions/upload-pages-artifact@v3 with: path: ./out @@ -92,4 +92,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v2 \ No newline at end of file + uses: actions/deploy-pages@v4 \ No newline at end of file diff --git a/next.config.js b/next.config.js index c363c65..a373aee 100644 --- a/next.config.js +++ b/next.config.js @@ -1,7 +1,9 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - trailingSlash: true, output: "export", + basePath: '/', + // reactStrictMode: true, + trailingSlash: true, env: { BASE_URL: process.env.NEXT_PUBLIC_MAPBOX_API_KEY, }