33 lines
833 B
YAML
33 lines
833 B
YAML
steps:
|
|
# Build the container image
|
|
- name: 'gcr.io/cloud-builders/docker'
|
|
args: ['build', '-t', 'gcr.io/$GOOGLE_CLOUD_PROJECT/livewire-ui', '.']
|
|
dir: 'client'
|
|
|
|
# Push the container image to Container Registry
|
|
- name: 'gcr.io/cloud-builders/docker'
|
|
args: ['push', 'gcr.io/$GOOGLE_CLOUD_PROJECT/livewire-ui']
|
|
|
|
# Deploy container image to Cloud Run
|
|
- name: 'gcr.io/cloud-builders/gcloud'
|
|
args:
|
|
- 'run'
|
|
- 'deploy'
|
|
- 'livewire-ui'
|
|
- '--image'
|
|
- 'gcr.io/$GOOGLE_CLOUD_PROJECT/livewire-ui'
|
|
- '--region'
|
|
- 'us-central1'
|
|
- '--platform'
|
|
- 'managed'
|
|
- '--allow-unauthenticated'
|
|
- '--port'
|
|
- '8080'
|
|
- '--set-env-vars'
|
|
- 'BACKEND_URL=${_BACKEND_URL}'
|
|
|
|
images:
|
|
- 'gcr.io/$GOOGLE_CLOUD_PROJECT/livewire-ui'
|
|
|
|
substitutions:
|
|
_BACKEND_URL: 'PLEASE_REPLACE_WITH_BACKEND_URL' # Placeholder to remind users to set it |