Skip to content

Commit

Permalink
Merge pull request DeXter-on-Radix#328 from EvgeniiaVak/main
Browse files Browse the repository at this point in the history
fix routing on github pages
  • Loading branch information
EvgeniiaVak authored Apr 4, 2024
2 parents ac604df + c47c76d commit 6098482
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/stokenet-deploy-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,16 @@ jobs:
with:
node-version: "20"
cache: ${{ steps.detect-package-manager.outputs.manager }}
# - name: Setup Pages
# 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
- name: Setup Pages
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
run: echo "BASE_PATH=/${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
- name: Restore cache
uses: actions/cache@v4
with:
Expand Down
3 changes: 3 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ const nextConfig = {
reactStrictMode: false,

pageExtensions: ["js", "jsx", "mdx", "ts", "tsx"],

// for github pages
basePath: process.env.BASE_PATH || "",
};

module.exports = withMDX(nextConfig);

0 comments on commit 6098482

Please sign in to comment.