Just a Web Developer from Bandung
- open next.config.mjs set output to export
- For dynamic page makesure to use generateStaticParams before export
- then
npm run build - type
touch out/.nojekyllbecause GitHub Pages ignores _next/ files by default.
-
go to vercel -> project -> setting - git section
-
in the "Ignored build step" select behaviour "custom" then use
[ "$VERCEL_GIT_COMMIT_REF" != "main" ] && echo "Skipping deploy for branch $VERCEL_GIT_COMMIT_REF" && exit 0this will only trigger deployment when commit to
mainbranch, you can also change the branch as needed