Heroku automatic deploy/CircleCI integration

Hi,

On Heroku Dashboard, at the Deploy tab, I have the option to configure an automatic deploy for a specific branch and there is an option “Wait for CI to pass before deploy”. What happens when I have both this and the circle.yml configured for an automated deploy on Heroku? Will the app be deployed twice?

Also, I have a VueJS/Webpack application and what I usually do to deploy is to execute the following commands:

export API_URL="http://api.url"
export API_KEY="xxxxx"
npm run build
git add .
git commit -m 'production build’
git push heroku git subtree split --prefix dist develop:master --force

Is it ok to configure these commands on circle.yml deployment phase? Or is it better to configure a Heroku Buildpack?

Thanks in advance.