Deploy Apps And Functions To Firebase From A Mono Repo With GitHub Actions
How to deploy applications and functions from a mono repo with GitHub Actions to Firebase Hosting and Functions
I share one trick a day until the end of the COVID-19 quarantine in Switzerland, April 19th 2020. Twenty-seven days left until hopefully better days.
The article is super comprehensive and I even already have published a following post about it once before 🤣. Nevertheless I think that this challenge is the perfect excuse to publish again another follow-up 😉.
Our open source project DeckDeckGo contains many Progressive Web Apps and Cloud Functions, for which, obviously, I did set up GitHub actions as Julien displayed.
In this blog post I share the enhancement I had to implement in order to make the integration supports a mono repo.
To Firebase Hosting
Let’s say that one of your application is available in a sub-folder of our repo called
docs . Basically, everything you have to do in addition to the original post is to prefix all steps of the Action with your sub-directory, respectively with
Concretely, if for example we would like to trigger the action when a merge happens in the master branch, but, only if a modifications impacts our specific app, we specify a path to the Action
Listen to push to master for the all repo:
Listen to push to master only if sub-folder is affected:
Because the Git checkout of our pipeline happens on the root level of our repo, when it goes to installing dependencies or running a build, we do have to observe our sub-folder too. For such purpose, GitHub Action provides a handy option
working-directory for the