# Google Cloud Build config for deploying site to Firebase hosting # # PREREQUISITES: # You must enable firebase and allow Cloud Build to publish to it # 1. Enable the following APIs: # - Cloud Resource Manager API # - Firebase Management API # - Firebase Hosting API # 2. Grant the following roles to the Cloud Build service account (@cloudbuild.gserviceaccount.com): # - Firebase Admin # - API Keys Admin # (Alternativey, use a (Firebase Token)[https://github.com/GoogleCloudPlatform/cloud-builders-community/tree/master/firebase#with-token] # to grant publishing access to Cloud Build.) steps: - name: 'gcr.io/cloud-builders/yarn' args: ['install'] - name: 'gcr.io/cloud-builders/yarn' args: ['run', 'build'] - name: 'gcr.io/$PROJECT_ID/firebase' args: ['deploy', "--project", "$PROJECT_ID", "--only", "hosting"]