title: Failure to deploy on netlify: failed during stage 'building site': Build script returned non-zero exit code: 255
body: <p>I failed to deploy my file, which was developed from blogdown (dev, R 3.6.1) and hugo (0.57.2) on the netlify platform. </p>
  
  <p>I have tried to update the URL of my <code>config.toml</code> file from <code>\</code> to my target web name <code>https*.com\</code> . 
  Also, I created a <code>netlify.toml</code> at the root directory. 
  Both of them did not make any sense.</p>
  
  <p>Local development is fine, while the netlify could not be deployed well.</p>
  
  <pre><code>failed during stage 'building site': Build script returned non-zero exit code: 255
  </code></pre>
  
  <p>Related code:</p>
  
  <pre><code> blogdown::new_site(theme = "gcushen/hugo-academic")
  </code></pre>
  
  <pre><code># netlify
  [build]
    publish = "public"
    command = "hugo"
  [context.production.environment]
    HUGO_VERSION = "0.57.2"
    HUGO_ENV = "production"
    HUGO_ENABLEGITINFO = "true"
  [context.branch-deploy.environment]
    HUGO_VERSION = "0.57.2"
  </code></pre>
  
  <pre><code># 0.57.2
  blogdown::hugo_version()
  </code></pre>