title: Gatsby not working paths deployed on the github pages (adding repo name in the url)
body: <p>I deployed a gatsby website  with the Github pages and I'm having errors like that:
  <a href="https://i.stack.imgur.com/tvF9I.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tvF9I.png" alt="enter image description here" /></a>
  Locally everything works perfectly, errors occur only on the server.
  Seems like the server can not resolve paths correctly.
  I'm adding unnecessary repository name after domain. How to remove that?
  I tried changing some host options and deploying app again and once it worked properly, IDK why, then I made another deploy and it crushed again.
  My gatsby.config:</p>
  <pre><code>const path = require(&quot;path&quot;);
  const { title, keywords, description, author, defaultLang, trackingId } = require(&quot;./config/site&quot;);
  
  module.exports = {
    pathPrefix: &quot;/lbearthworks&quot;,
    siteMetadata: {
      title,
      keywords,
      description,
      author,
    },
    plugins: [
      {
        resolve: &quot;gatsby-plugin-google-analytics&quot;,
        options: {
          trackingId,
        },
      },
      {
        resolve: &quot;gatsby-plugin-manifest&quot;,
        options: {
          name: title,
          short_name: &quot;Lb&quot;,
          start_url: &quot;/&quot;,
          background_color: &quot;#212121&quot;,
          theme_color: &quot;#fed136&quot;,
          display: &quot;minimal-ui&quot;,
          icon: &quot;content/assets/gatsby-icon.png&quot;,
        },
      },
      &quot;gatsby-transformer-remark&quot;,
      {
        resolve: &quot;gatsby-source-filesystem&quot;,
        options: {
          name: &quot;markdown&quot;,
          path: `${__dirname}/content`,
        },
      },
      {
        resolve: &quot;gatsby-source-filesystem&quot;,
        options: {
          name: &quot;images&quot;,
          path: `${__dirname}/content/assets/images`,
        },
      },
      &quot;gatsby-plugin-eslint&quot;,
      &quot;gatsby-plugin-react-helmet&quot;,
      &quot;gatsby-transformer-sharp&quot;,
      &quot;gatsby-plugin-sharp&quot;,
      &quot;gatsby-plugin-offline&quot;,
      {
        resolve: &quot;gatsby-plugin-sass&quot;,
        options: {
          data: `@import &quot;core.scss&quot;;`,
          includePaths: [path.resolve(__dirname, &quot;src/style&quot;)],
        },
      },
      ...
    ],
  };
  </code></pre>
  <p><a href="https://lbrobotyziemne.pl/" rel="nofollow noreferrer">Live version</a></p>
  <p><a href="https://github.com/karpinski1994/lbearthworks" rel="nofollow noreferrer">Github Reository</a></p>