conflict#2
Open
violetguos wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Done. Here's the summary:
What changed
File Change
next.config.ts output: 'export' + images.unoptimized + basePath when STATIC_MODE
src/lib/config.ts New — exports isStaticMode boolean from env var
src/app/layout.tsx Hides "New Plan" button in static mode
src/app/plans/[id]/page.tsx generateStaticParams, CRUD buttons via dynamic import (avoids bundling "use server" in static mode)
src/app/plans/[id]/plan-actions.tsx New — Edit/Delete button component (client component with server action)
src/app/plans/[id]/edit/page.tsx generateStaticParams, shows "Not Available" notice in static mode
src/app/plans/new/page.tsx Shows "Not Available" notice in static mode
src/app/products/[id]/page.tsx generateStaticParams
scripts/static-build.mjs New — temporarily stubs actions.ts during build (server actions aren't supported in static export)
.github/workflows/deploy.yml New — GitHub Actions: generate Prisma client → npm run build:static → upload → deploy
.nojekyll New — tells GitHub Pages not to process with Jekyll
How to deploy
If your repo name is different from jherb-script, update NEXT_PUBLIC_BASE_PATH in .github/workflows/deploy.yml.
Local dev still works
npm run dev # full CRUD with Server Actions
npm run build # normal server build
npm run build:static # static export (stubs actions.ts, restores after)