updated readme.md pt.2 #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Google Cloud Run | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
setup-build-deploy: | |
name: Setup, Build, and Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Google Cloud SDK | |
uses: google-github-actions/setup-gcloud@v0.2.1 | |
with: | |
service_account_key: ${{ secrets.GCP_SA_KEY }} | |
project_id: sales-eng-agent-neo-project | |
export_default_credentials: true | |
- name: Configure Docker | |
run: gcloud auth configure-docker | |
- name: Build Docker image | |
run: | | |
docker build -t gcr.io/sales-eng-agent-neo-project/agent-neo-react-fe:latest -f src/main/app/frontend/Dockerfile src/main/app/frontend | |
- name: Push Docker image to Google Container Registry | |
run: | | |
docker push gcr.io/sales-eng-agent-neo-project/agent-neo-react-fe:latest | |
- name: Deploy to Google Cloud Run | |
run: | | |
gcloud run deploy agent-neo-react-fe --image gcr.io/sales-eng-agent-neo-project/agent-neo-react-fe:latest --region us-central1 --platform managed --allow-unauthenticated | |
env: | |
PROJECT_ID: sales-eng-agent-neo-project | |
IMAGE_NAME: agent-neo-react-fe | |
REGION: us-central1 | |
SERVICE_NAME: agent-neo-react-fe |