How to build project from src?

I think I familiarised myself with circle ci quiet well, but hat I can’t figure out is at what stage and how do I specify build scripts to create dist/ folder with compiled files from my src/ folder ( The command to do this is npm run build ) I then want to deploy this dist/ folder

Hi,

Where you do it is somewhat flexible. Typically building source, images, etc would be done in the dependencies section. This allows you to then use the built images, binaries, etc for testing purposes in the test section. Then, if things work out, you can optionally deploy in the deployment section. Information on this sections can be found here.

Specifically, I would do it in:

dependencies:
  post:
    - my-build-command

unless CircleCI is inferring commands you don’t want to run. In that case, you can use the override sub-section.

Let me know if that helps or if that was confusing at all. :slight_smile:

What happens if I build 3 environments after? do I just add the commands one after the other?