thanks @FelicianoTech that was the problem. Build succeeds now when both heroku and master in in sync with commits.
But now the problem I am having is that when I build a node app from command line on local machine. As part of the build I have some static assets (e.g js/css files which gets compiled into a dist directory) and when I include that dist directory while checking into master and then deploy to heroku using:
git push heroku master
Heroku website work as compiled dist directory which has index.html in it as well and node is serving that index file as a single page application.
However, from circle ci, I have a build script before heroku deployment. (The whole configuration is shown in script above, the build script is ng build --prod, which compiles angular 2 application into dist directory). Build step completes successfully by circle, but the dist doesn’t get deployed to heroku.
Here is the last build:
and the site url is:
Am I right in thinking that like other CI servers, you just push your source code and any production artifacts which get produced as part of build/release step, CI picks up and pushes them?
I am a little confused here. Am I missing a step here, so that I don’t have to include dist directory in master and ci pushes them as part of heroku deployment?