title: How to upload a generated folder content into S3 using CodeBuild?
body: <p>I am trying to configure a CodePipeline on AWS that it takes my Nuxt website on Github, run the command <code>npm run generate</code> to generate the static website then upload the <code>dist</code> folder on an S3 bucket.</p>
  
  <p>Here what my <code>buildspec.yml</code> it looks like:</p>
  
  <pre class="lang-sh prettyprint-override"><code>version: 0.2
  
  phases:
    install:
      commands:
        - npm install
    build:
      commands:
        - npm run generate
    post_build:
      commands:
        - aws s3 sync dist $S3_BUCKET
  </code></pre>
  
  <p>The error I get is: <code>The user-provided path dist does not exist.</code> Is anyone know how to correct this? I read a lot about artefacts but I never use them before…</p>
  
  <p>Thanks in advance,</p>