How to add GitHub repositories in Profile Installation How to add Git repositories to install module while installing Drupal 8 Profile. Is any way to add repositories path in .yml or .profile to module installation?
Is this possible?
The easiest way is to add the dependencies to your profile's composer.json file, and use Composer to install the profile into your project. The dependencies will be automatically downloaded with it.

Failing that, it'll be a custom script job which will take whatever shape makes sense for your workflow/config.