title: How to deploy a maven repository on gitlab to heroku
body: <p>I created a .gitlab-ci.yml file and tried to deploy my maven repository on gitlab to heroku. Unfortunately I don't understand how to do this without the heroku-cli (which I could not install on gitlab).
  The build process and test process is not failing but the deployment process is due to my lack of information about how it exactly works.</p>
  
  <p>The yml file I created looks like this:</p>
  
  <pre><code>before_script:
    - apk update &amp;&amp; apk add git 
    - apk update &amp;&amp; apk add openjdk8
    - apk update &amp;&amp; apk add maven
    - git --version
  
  build:
    stage: build
    script:
      - mvn compile
  
  test:
    stage: test
    script:
      - mvn test
  
  deploy:
    stage: deploy
    script:
      - heroku git:remote -a NAME_OF_MY_HEROKUAPP
      - git push heroku master
    only:
      - master
  </code></pre>