Deploy compiled ( generated ) file into Heroku

heroku
deployment
nodejs
circle.yml

#1

I have a nodejs project using Babel. I’m trying compile all es6 files to normal JS files then deploy to Heroku.

But seems the generated file are not deployed.

I try two different configs:

The first one, build after test, then deploy by standard command:

test:
  post:
    - yarn build

deployment:
  develop:
    branch: develop
    heroku:
      appname: my-app

The second one:

deployment:
  develop:
    branch: develop
    commands:
      - "[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow"
      - yarn build
      - git config --global user.email "me@my.com"
      - git config --global user.name "My Name"
      - git commit -am "build"
      - git push git@heroku.com:my-app.git $CIRCLE_SHA1:refs/heads/master

But seems not working, the original ( es6 ) files always be deployed into Heroku.


#2

@ZheFeng Does it work without the git stuff?

Short of the “yarn” package already being installed on our Ubuntu 14.04 image, this post seems to indicate that it should Just Work.


#3