Vue: Documentation on how to deploy VueJS app to GitHub Pages is wrong and incomplete

Created on 28 Nov 2018  路  9Comments  路  Source: vuejs/vue

Version

2.4.4

Reproduction link

https://jedrekdomanski.github.io/bikeramp-front/

Steps to reproduce

Follow the article https://cli.vuejs.org/guide/deployment.html#github-pages

What is expected?

Deployment is successful

What is actually happening?

GH Pages does not see dist/ folder, application does not work.


My repo: https://github.com/jedrekdomanski/bikeramp-front

Most helpful comment

Thank you. It worked.

How did you know that? I did not read that on GitHub Pages docs.

All 9 comments

You should probably deploy your bundled files in the gh-pages branch. See GitHub Pages' documentation.

That's waht I did. I have gh-pages branch with dist/ folder in it and I am building the app from gh-pages but it does not work.
https://github.com/jedrekdomanski/bikeramp-front/tree/gh-pages

module.exports = {
baseUrl: process.env.NODE_ENV === 'production'
? '/bikeramp-front/'
: '/'
}

I am getting 404 GET https://jedrekdomanski.github.io/dist/build.js
My project is at https://jedrekdomanski.github.io/bikeramp

https://github.com/jedrekdomanski/bikeramp-front/blob/master/webpack.config.js#L8
publicPath in your webpack config is wrong, it should be /bikeramp-front/ in your case.

@jedrekdomanski You are directly modify gh-pages branch instead of building App and running deploy.sh in master branch. Please read document about GitHub Pages by yourself.

And also, you are not using vue-cli at all, and it is your own usage problem which is not related to Vue core/cli at all.

I've already tried the document-way, it did not work but I will try one one time.

I've tried again and it still doesn't work.
https://jedrekdomanski.github.io/bikeramp-front/
https://github.com/jedrekdomanski/bikeramp-front/tree/gh-pages

So where should I raise this issue? This is related to the documentation which clearly is wrong.

@jedrekdomanski See https://github.com/jedrekdomanski/bikeramp-front/pull/1, there is nothing wrong in document because it's your own usage problem about GitHub Pages, not Vue related at all.

Thank you. It worked.

How did you know that? I did not read that on GitHub Pages docs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bfis picture bfis  路  3Comments

robertleeplummerjr picture robertleeplummerjr  路  3Comments

paulpflug picture paulpflug  路  3Comments

franciscolourenco picture franciscolourenco  路  3Comments

paceband picture paceband  路  3Comments