title: Deploying VueJS to GitHub Pages
body: <p>I have followed the <a href="https://cli.vuejs.org/guide/deployment.html#github-pages" rel="nofollow noreferrer">guide</a> to deploy a VueJS app to GitHub pages step by step and it throws an error <code>GET https://jedrekdomanski.github.io/bikeramp-front/ 404 ()</code></p>
  <p>My repo (<code>gh-pages</code> branch): <a href="https://github.com/jedrekdomanski/bikeramp-front/tree/gh-pages" rel="nofollow noreferrer">https://github.com/jedrekdomanski/bikeramp-front/tree/gh-pages</a></p>
  <p>Website: <a href="https://jedrekdomanski.github.io/bikeramp-front/" rel="nofollow noreferrer">https://jedrekdomanski.github.io/bikeramp-front/</a></p>
  <h3>script</h3>
  <p><a href="https://cli.vuejs.org/guide/deployment.html#github-pages" rel="nofollow noreferrer">https://cli.vuejs.org/guide/deployment.html#github-pages</a></p>
  <pre><code>#!/usr/bin/env sh
  
  # abort on errors
  set -e
  
  # build
  npm run build
  
  # navigate into the build output directory
  cd dist
  
  # if you are deploying to a custom domain
  # echo 'www.example.com' &gt; CNAME
  
  git init
  git add -A
  git commit -m 'deploy'
  
  # if you are deploying to https://&lt;USERNAME&gt;.github.io
  # git push -f git@github.com:&lt;USERNAME&gt;/&lt;USERNAME&gt;.github.io.git master
  
  # if you are deploying to https://&lt;USERNAME&gt;.github.io/&lt;REPO&gt;
  git push -f git@github.com:jedrekdomanski/bikeramp-front.git master:gh-pages
  
  cd -
  </code></pre>
  <h3>vue.config.js</h3>
  <pre><code>module.exports = {
    baseUrl: process.env.NODE_ENV === 'production'
      ? '/bikeramp-front/'
      : '/'
  }
  </code></pre>
  <p>I am serving the app from <code>gh-pages</code>, like they said.</p>
  <h3>Source</h3>
  <p><code>Your GitHub Pages site is currently being built from the gh-pages branch.</code>
  What am I doing wrong?</p>
  <h3>package.json</h3>
  <pre><code>{
    ...
    &quot;private&quot;: true,
    &quot;scripts&quot;: {
      &quot;dev&quot;: &quot;cross-env NODE_ENV=development webpack-dev-server --open --hot&quot;,
      &quot;build&quot;: &quot;cross-env NODE_ENV=production webpack --progress --hide-modules&quot;
    },
    &quot;dependencies&quot;: {
      &quot;axios&quot;: &quot;^0.18.0&quot;,
      &quot;chart.js&quot;: &quot;^2.7.3&quot;,
      &quot;vue&quot;: &quot;^2.4.4&quot;,
      &quot;vue-chartjs&quot;: &quot;^3.4.0&quot;,
      &quot;vue-router&quot;: &quot;^3.0.1&quot;,
      &quot;vuex&quot;: &quot;^3.0.0&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;babel-core&quot;: &quot;^6.26.0&quot;,
      &quot;babel-loader&quot;: &quot;^7.1.2&quot;,
      &quot;babel-preset-env&quot;: &quot;^1.6.0&quot;,
      &quot;babel-preset-stage-2&quot;: &quot;^6.24.1&quot;,
      &quot;cross-env&quot;: &quot;^5.0.5&quot;,
      &quot;css-loader&quot;: &quot;^0.28.11&quot;,
      &quot;file-loader&quot;: &quot;^1.1.4&quot;,
      &quot;vue-loader&quot;: &quot;^13.0.5&quot;,
      &quot;vue-template-compiler&quot;: &quot;^2.4.4&quot;,
      &quot;webpack&quot;: &quot;^3.6.0&quot;,
      &quot;webpack-dev-server&quot;: &quot;^2.9.1&quot;
    }
  }
  </code></pre>