Look at the Nuxt 3 documentation to learn more.
Make sure to install the dependencies:
# npm
npm install
# pnpm
pnpm install
# yarn
yarn install
Start the development server on http://localhost:3000
:
# npm
npm run dev
# pnpm
pnpm run dev
# yarn
yarn dev
Build the application for production:
# npm
npm run build
# pnpm
pnpm run build
# yarn
yarn build
Locally preview production build:
# npm
npm run preview
# pnpm
pnpm run preview
# yarn
yarn preview
Check out the deployment documentation for more information.
Define .env file with:
GQL_HOST=
Go in the Github repository settings, in "Secrets and variables" / "Actions" / "Variables", click "New repository variable".
Look the result (static version):
https://syldel.github.io/nuxt-fun-project/
Help here:
https://dev.to/angular/build-deploy-angular-apps-in-github-pages-using-github-actions-e7a
To enable GITHUB_TOKEN:
Go in the Github repository settings, in "Actions" / "General" / "Workflow permissions", enable "Read and write permissions"!
baseURL
By default, the Nuxt baseURL is set to '/'.
However, the baseURL can be updated at runtime by setting the NUXT_APP_BASE_URL as an environment variable.
underscore-prefixed directories
By default GitHub Pages ignores underscore-prefixed directories. The fix is to add a .nojekyll file.