Skip to content

Commit

Permalink
trying to fix deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
melikechan committed Jul 5, 2024
1 parent 28a0922 commit 88f9338
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#
name: Deploy Next.js site to Pages

env:
GITHUB_PAGES: true

on:
# Runs on pushes targeting the default branch
push:
Expand Down Expand Up @@ -53,14 +56,6 @@ jobs:
with:
node-version: "20"
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
3 changes: 3 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ const withMdx = nextMdx({
/** @type {import('next').NextConfig} */
const nextConfig = withMdx({
pageExtensions: ['mdx', 'jsx', 'js'],
reactStrictMode: true,
basePath: process.env.GITHUB_PAGES ? '/melikechan.github.io' : '',
assetPrefix: process.env.GITHUB_PAGES ? '/melikechan.github.io/' : '',
});

export default nextConfig;
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"name": "melikechan.github.io",
"version": "0.1.0",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"deploy": "next build && next export && touch out/.nojekyll && gh-pages -d out"
"lint": "next lint"
},
"dependencies": {
"@icons-pack/react-simple-icons": "^9.6.0",
Expand Down

0 comments on commit 88f9338

Please sign in to comment.