---
stages:
- name: Build Stage
  inputs:
  - type: git
    branch: master
    service: ${REPO}
  jobs:
  - name: Build
    type: builder
    artifact_dir: ''
- name: Deploy Stage
  inputs:
  - type: job
    stage: Build Stage
    job: Build
  triggers:
  - type: stage
  jobs:
  - name: Deploy
    type: deployer
    target:
      region_id: ${CF_REGION_ID}
      organization: ${CF_ORGANIZATION}
      space: ${CF_SPACE}
      application: ${CF_APP}
    script: |-
      #!/bin/bash
      cf create-service text_to_speech standard my-text-to-speech
      # Push app
      export CF_APP_NAME="$CF_APP"
      cf push "${CF_APP_NAME}"
