CircleCI is deploying my GitHub branch and not my CircleCI version

Hi

I’ve created a new CircleCI project that is triggered from a commit on a master GitHub branch. During the build process my config.yml installs grunt and runs some grunt tasks to minify, update URLs for production.

The build runs fine but CircleCI then deploys to AWS Elasticbeanstalk the GitHub version of the code and not the copy on CircleCI that has been grunted.

I’ve the same setup on2 other Circle projects and then work fine. I’m confused as to why the new project isn’t working the same way.

Regards
Andrew

Hi Andrew,

Could you share your circle.yml?

Best,
Lev

Hello

I’ve managed to get it working by running the build with SSH, then via the command line on the Circle instance run:

eb init

I then looked to see what was in the .ebelasticbeanstalk/config.yml created by the init command, compared with my GitHub version and changed from this:

branch-defaults:
  default:
   environment: 'eb-environment-name'
global:
  application_name: 'projectname'
  default_ec2_keyname: null
  default_platform: php
  default_region: eu-west-1
 profile: null
  sc: null

to this:

branch-defaults:
  master:
   environment: 'eb-environment-name'
global:
  application_name: 'projectname'
  default_ec2_keyname: andrewskey-pair
  default_platform: php
  default_region: eu-west-1
 profile: null
  sc: git

And the

eb deploy

In my circle.yml worked and deployed the local code on Circle.

Strangely, my other projects’ config.yml are different but they work. Not sure if my initial setup steps with CircleCI were they same.

Regards
Andrew

1 Like

This is interesting, thanks for sharing the solution!

I assume that doing the

eb deploy

As part of the circle.yml is the correct way to deploy my code when altered after running through the gruntjs tasks?