Skip to content

Commit

Permalink
add basepath
Browse files Browse the repository at this point in the history
  • Loading branch information
CloudLun committed Feb 22, 2024
1 parent f3421d6 commit 276b92f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ jobs:
cache: ${{ steps.detect-package-manager.outputs.manager }}
- name: Setup Pages
uses: actions/configure-pages@v4
with:
# 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@v4
with:
Expand All @@ -75,8 +75,8 @@ 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@v3
with:
Expand All @@ -92,4 +92,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "export",
basePath: '/github-pages',
// env: {
// BASE_URL: process.env.NEXT_PUBLIC_MAPBOX_API_KEY,
// }
Expand Down

0 comments on commit 276b92f

Please sign in to comment.