Deploy the New Service
Explore how to deploy new Firebase Cloud Functions as independent services using GitHub workflows. Learn to configure triggers, test, and deploy event-driven features separately to ensure reliable continuous deployment without affecting other parts of your web app.
We'll cover the following...
What’s left to do is to test and deploy the service as part of our continuous deployment pipeline. We already have an example in
.github/workflows/services-web.yml. Let’s look at the requirements.
Requirements
- Run the services-web workflow only when the web application code changes, not when underlying Firebase Cloud Functions change.
- For each Firebase Cloud Function, create an independent workflow and run it only when the specific service changes.
Updating workflow file
Due to the nature of how Firebase Cloud Functions are set up in sub-directories
of services/web, the current services-web.yml workflow would be triggered for all changes to any of the Firebase Cloud
Functions because we configured the trigger as follows:
on:
push:
paths:
- "services/web/**"
The folks at GitHub thought of us when they designed the GitHub workflow syntax. Click Run and change the above to the following, including the negative ...