Skip to content

Instantly share code, notes, and snippets.

@maxmckenzie
Last active July 29, 2019 09:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxmckenzie/385fc0c75b0826dea847dae59b18e81f to your computer and use it in GitHub Desktop.
Save maxmckenzie/385fc0c75b0826dea847dae59b18e81f to your computer and use it in GitHub Desktop.
gitlab-ci deploy to heroku #ci
stages:
- deploy
deploy to development:
stage: deploy
script:
- apt-get update -qy
- apt-get install -y ruby-dev
- gem install dpl
- dpl --provider=heroku --strategy=api --app=example-dev --api-key=$HEROKU_API_KEY
environment:
name: development/$CI_COMMIT_REF_NAME
url: https://dev.example.ch/
only:
- develop
deploy to staging:
stage: deploy
script:
- apt-get update -qy
- apt-get install -y ruby-dev
- gem install dpl
- dpl --provider=heroku --strategy=api --app=example-staging --api-key=$HEROKU_API_KEY
environment:
name: staging/$CI_COMMIT_REF_NAME
url: https://staging.example.ch/
only:
- master
deploy to production:
stage: deploy
script:
- apt-get update -qy
- apt-get install -y ruby-dev
- gem install dpl
- dpl --provider=heroku --strategy=api --app=example --api-key=$HEROKU_API_KEY
environment:
name: production/$CI_COMMIT_REF_NAME
url: https://example.ch/
only:
- master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment