Problem with deploy Nuxt.js in GitHub Pages

Viewed 1374
1 Answers

I've already tried to follow that steps and they didn't work for me, after some researches I ended up with following steps :

  1. remove the dist entry from .gitignore file
  2. run npm run generate
  3. run git add . then git commit -m "deploy on gh-pages"
  4. We need to add router base configuration in nuxt.config.js:
      target: 'static',
      router: {
        base: '/<repository-name>/'
      }
  1. run git subtree push --prefix dist origin gh-pages

Make sure to delete the current gh-pages branch before running these commands.

Related