I have a git repo with a submodule in it which I would like to deploy to heroku on an auto-deployed pipeline, but when the ng build --prod
process is near completion I get the error
ERROR in : Couldn't resolve resource ./repo/style.css relative to /tmp/build_d3089108a84fd9e7fb117fed84b787b6/src/app/resume/resume.component.ts
because my submodule (which exists at /src/app/resume/repo
) is referenced in the file resume.component.ts
:
@Component({
selector: 'app-resume',
templateUrl: './repo/resume.html',
styleUrls: ['./repo/style.css']
})
and although the github repo points to a specific commit for the submodule, the initial git clone does not clone the submodule alongside it.
My .gitmodules
file is as follows:
[submodule "Resume"]
path = src/app/resume/repo
url = https://github.com/<my username>/Resume.git
Question:
Is there a way to force heroku-git to clone submodules at the same time as the full repo?
Can I run a script that makes heroku clone the submodule on its own after cloning the full repo but before building?