I have the following script in my package.json for my NextJS project.
package.json
NextJS
"predeploy": "next build && next export