This repo can auto-deploy all production services whenever code is pushed to main.
- GitHub Actions workflow:
.github/workflows/deploy-main.yml
- Node backend to Cloud Run using
cloudbuild.yaml - Live backend to Cloud Run using
cloudbuild-live.yaml - Frontend to Firebase Hosting after building with the latest deployed backend/live URLs
GCP_PROJECT_ID: GCP project id (example:witness-489710)GCP_WIF_PROVIDER: Workload Identity Provider resource name- format:
projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/providers/PROVIDER_ID
- format:
GCP_DEPLOY_SERVICE_ACCOUNT: deploy service account email- example:
github-deployer@witness-489710.iam.gserviceaccount.com
- example:
roles/cloudbuild.builds.editorroles/run.adminroles/iam.serviceAccountUserroles/artifactregistry.writer(or Container Registry write access if using gcr)roles/firebasehosting.adminroles/serviceusage.serviceUsageConsumer
- Push this workflow to
main. - Add the required GitHub secrets in repository settings.
- Ensure your GitHub repo is trusted by the configured Workload Identity Provider.
- Push a new commit to
mainand watch theDeploy On Mainworkflow run.
Use this link in your submission as proof of deployment automation:
.github/workflows/deploy-main.yml