Skip to content

Commit

Permalink
actions/configure-pages@v5 was improperly injecting next.config.js
Browse files Browse the repository at this point in the history
…data when wrapped by the `withMdx`
  • Loading branch information
Woozl committed Jul 11, 2024
1 parent 434d269 commit cec0a99
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/gh-pages-nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ permissions:
pages: write
id-token: write

env:
BASE_PATH: /aixb-landing-page

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
Expand Down Expand Up @@ -55,12 +58,6 @@ jobs:
cache: ${{ steps.detect-package-manager.outputs.manager }}
- name: Setup Pages
uses: actions/configure-pages@v5
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
- name: Restore cache
uses: actions/cache@v4
with:
Expand Down
2 changes: 2 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ const withMDX = require('@next/mdx')({
extension: /\.mdx?$/,
})
module.exports = withMDX({
output: 'export',
basePath: process.env.BASE_PATH ?? '',
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'md', 'mdx'],
})

0 comments on commit cec0a99

Please sign in to comment.