Skip to content

Instantly share code, notes, and snippets.

@TheJotob
Last active August 23, 2022 17:15
Show Gist options
  • Save TheJotob/0a59917f0b72a42d9f6cd6515ecf477d to your computer and use it in GitHub Desktop.
Save TheJotob/0a59917f0b72a42d9f6cd6515ecf477d to your computer and use it in GitHub Desktop.
Deploy multiple apps to Heroku from one Repository
stages:
- deploy
deploy:frontend:
script:
- git remote add heroku-frontend https://heroku:$HEROKU_API_KEY@git.heroku.com/frontend-app.git
- git push --force heroku-frontend `git subtree split --prefix frontend-folder HEAD`:master
only:
- master
stage: deploy
deploy:api:
script:
- git remote add heroku-api https://heroku:$HEROKU_API_KEY@git.heroku.com/backend-app.git
- git push --force heroku-api `git subtree split --prefix backend-folder HEAD`:master
only:
- master
stage: deploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment