Added Cors Policy #7
This file contains hidden or 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: cd | |
| on: | |
| push: | |
| paths: | |
| - 'backend/**' | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| name: deploy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - id: 'auth' | |
| uses: 'google-github-actions/auth@v2' | |
| with: | |
| credentials_json: '${{ secrets.GCP_CREDENTIALS }}' | |
| - name: 'Set up Cloud SDK' | |
| uses: 'google-github-actions/setup-gcloud@v2' | |
| - name: 'Build and Deploy Image To Artifact Registry' | |
| run: | | |
| cd backend | |
| gcloud builds submit --tag us-central1-docker.pkg.dev/my-portfolio-441113/polcon-backend/polcon-backend:latest | |
| - name: Deploy to Cloud Run | |
| run: gcloud run deploy polcon-backend --image us-central1-docker.pkg.dev/my-portfolio-441113/polcon-backend/polcon-backend:latest --region us-central1 --allow-unauthenticated --project my-portfolio-441113 --max-instances=4 --set-secrets=GOOGLE_GEMINI_API_KEY=GOOGLE_GEMINI_API_KEY:latest |