Skip to content

Instantly share code, notes, and snippets.

@anchal20
Last active March 19, 2017 20:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anchal20/b3a3210a4f450913074f4c963398b961 to your computer and use it in GitHub Desktop.
Save anchal20/b3a3210a4f450913074f4c963398b961 to your computer and use it in GitHub Desktop.

Below are the steps to run your vue-cli project on gh-pages

  • Edit your config/index.js - change all dist to docs and add update 'assetsPublicPath' value to './' in the build module
  • Run 'npm run build', this will build your project and create production files.
  • Now push your code to your master branch.
  • Lastly, go to your github repo, open settings(the last tab), scroll down to the 'Github pages' section. Here update the source to 'master branch /docs folder'

Now open your url which would be https://[your user name].github.io/[your repo name].

Tada!! your vue-cli project is up and running! Congratulations :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment