From this post, I will use english in this blog, this should be improve my english.
You have to read previous post about dockerize React. For this tutorial, you must have heroku (for deploy test app) and gitlab account (for CI/CD process).
-
Create new app in heroku, in this case I make an app call first-react-apps. Copy the API key from menu Account Settings->Account->API key.
-
Add variable HEROKU_TEST_KEY at Settings->CI/CD->Variables
Add Variable at Gitlab CI/CD
-
Create .gitlab-ci.yml file. Usually I using ubuntu images to run pipeline, but it really take a long time to build. So after several trial & error, finally got this simple config working :).
image: alpine:latest
stages:
- testing
- production
test:
stage: testing
script:
- apk add ruby-dev
- apk add ruby-rdoc
- apk add git
- apk add curl
- gem install dpl
- dpl --provider=heroku --app=react-first-apps --api-key=$HEROKU_TEST_KEY
- Push to Gitlab and watch your pipeline run
It’s Working

Jika kamu merasa tulisan ini bermanfaat & membantu kamu, kamu bisa berdonasi lewat saweria
If you feel this website help you, you can donate at saweria