Deployment

Learn how to deploy your Nuxt Starter Kit application.

This starter kit heavily bound to NuxtHub, which is a hosting platform for Nuxt applications.

To deploy your application to NuxtHub, you should follow the official NuxtHub documentation.

Follow the Going to production guide before deploying your application to production.

Environment Variables

The most important part is to define your environment variables in the NuxtHub dashboard and for the GitHub action.

GitHub Action

You need to add the environment variables defined in the GitHub action file .github/workflows/nuxthub.yml in your GitHub repository settings:

  1. Go to your GitHub repository settings
  2. Navigate to Settings > Secrets and variables > Actions
  3. Add the secrets listed below env: in the .github/workflows/nuxthub.yml file.

Deploy via CLI

If you want to deploy your application via CLI, you can use the following command:

pnpm run deploy

Usually, you don't need to run this command manually, as the GitHub action will handle the deployment for you.

If you encounter the FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory error during deployment, you can try increasing the memory limit by modifing the build script in your package.json file:
"NODE_OPTIONS=--max_old_space_size=8192 nuxt build"