Skip to content

Instantly share code, notes, and snippets.

@sr2ds
Created January 16, 2019 17:27
Show Gist options
  • Save sr2ds/317e291add1ade1677ac2728502a1e0b to your computer and use it in GitHub Desktop.
Save sr2ds/317e291add1ade1677ac2728502a1e0b to your computer and use it in GitHub Desktop.
Continuous Integration - Laravel GitLab on Heroku
image: lorisleiva/laravel-docker:latest
phpunit:
stage: test
script:
- composer install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts
- cp .env.example .env
- php artisan key:generate
- phpunit --colors=never
production:
stage: deploy
variables:
HEROKU_API_KEY: $HEROKU_PRODUCTION_API_KEY
script:
- apk add ruby ruby-dev ruby-irb ruby-rake ruby-io-console ruby-bigdecimal ruby-json ruby-bundler yarn ruby-rdoc >> /dev/null
- apk update
- gem install dpl >> /dev/null
- dpl --provider=heroku --app=sr2ds-mercado-livre --api-key=$HEROKU_API_KEY
- yarn global add heroku@$HEROKU_CLI_VERSION
- heroku run php artisan migrate --seed --force --exit-code --app sr2ds-mercado-livre
- heroku run php artisan cache:clear --exit-code --app sr2ds-mercado-livre
- heroku run php artisan ml:anuncio --exit-code --app sr2ds-mercado-livre
@dimasrizqi
Copy link

maybe wrong in your heroku api key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment