Skip to content

Commit

Permalink
fixed deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaytonSmith committed Jun 19, 2024
1 parent 23058a9 commit 5b8fde9
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/deploy_backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
id-token: 'write'

steps:
- name: Checkout code
- name: Checkout repository
uses: actions/checkout@v2

- name: Auth
Expand All @@ -38,12 +38,18 @@ jobs:
- name: Configure Docker
run: gcloud auth configure-docker

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ vars.REGISTRY }}/${{ env.IMAGE_NAME }}

# Deploy the image to Cloud Run
- name: Deploy to Cloud Run
run: |
gcloud run deploy ${{ env.IMAGE_NAME }} \
--project=${{ vars.GCP_PROJECT_ID }} \
--image=${{ env.IMAGE_NAME }}\
--image=${{ steps.meta.outputs.tags }} \
--platform=managed \
--region=us-central1 \
--allow-unauthenticated \
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/docker_push_frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,38 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
push: true

# - name: Checkout repository
# uses: actions/checkout@v2

# - name: Auth
# uses: google-github-actions/auth@v1
# with:
# credentials_json: ${{ secrets.GCP_SA_KEY }}

# - name: Set up Cloud SDK
# uses: google-github-actions/setup-gcloud@v2
# with:
# project_id: ${{ secrets.GCP_PROJECT_ID }}

# - name: Configure Docker
# run: gcloud auth configure-docker

# - name: Extract metadata (tags, labels) for Docker
# id: meta
# uses: docker/metadata-action@v3
# with:
# images: ${{ vars.REGISTRY }}/${{ env.IMAGE_NAME }}

# Deploy the image to Cloud Run
- name: Deploy to Cloud Run
run: |
gcloud run deploy ${{ env.IMAGE_NAME }} \
--project=${{ vars.GCP_PROJECT_ID }} \
--image=${{ steps.meta.outputs.tags }} \
--platform=managed \
--region=us-central1 \
--allow-unauthenticated \
--update-env-vars=DATABASE_URL=${{ secrets.DATABASE_URL }},COHERE_API_KEY=${{ secrets.COHERE_API_KEY }},MINIMAP_API_URL=${{ vars.MINIMAP_API_URL }} \
--memory=4Gi \
--cpu=4 \
--max-instances=1

0 comments on commit 5b8fde9

Please sign in to comment.