Merge pull request #17 from neo4j-field/feature/cicd-fe #14
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 Agent Neo FE to 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 . | |
- 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 |