title: GitLab CI Pipeline on specific branch only
body: <p>I'm trying to implement GitLab CI Pipelines to build and deploy an Angular app. In our project we have two general branches: <code>master</code> (for production only) and <code>develop</code>. For development we create <code>feature/some-feature</code> branches from <code>develop</code> branch. When development finished, we create merge request from <code>feature/some-feature</code> to <code>develop</code>. When merge request approved and merged into <code>develop</code> branch I want to run a Pipeline in order to build application and deploy the build on some environment.</p>
  
  <p>I use the following setup in .gitlab-ci.yml:</p>
  
  <pre><code>image: node:7.5-configured
  
  stages:
      - build
      - deploy
  
  build_job:
      stage: build
      only:
          - develop
      script:
          - /bin/bash &lt;some script here&gt;
  
  ...
  </code></pre>
  
  <p>The problem is that Pipeline executed every time I push into any <code>feature/some-feature</code> branch. What's wrong with my setup? How can I force the Pipeline to be executed <strong>only</strong> when push performed into <code>develop</code> branch directly?</p>
  
  <p><strong>Solution</strong>
  It was my mistake - I had two different .gitlab-ci.yml files in <code>develop</code> branch and <code>feature/some-feature</code> branch.</p>