Skip to content

fix: CI/CD deploy

fix: CI/CD deploy #1

name: Deployment to the Google Cloud Platform run service
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m venv venv
. venv/bin/activate
pip install black
- name: Run black
run: |
. venv/bin/activate
black --check .
deploy:
runs-on: ubuntu-latest
needs: lint
steps:

Check failure on line 33 in .github/workflows/gcp_deployment.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/gcp_deployment.yaml

Invalid workflow file

You have an error in your yaml syntax on line 33
- name: Checkout code
uses: actions/checkout@v2
- name: Set up GCP SDK
uses: google-github-actions/setup-gcloud@v1
with:
version: 'latest'
service_account_key: ${{ secrets.GCP_SA_KEY }}
project_id: ${{ secrets.GCP_PROJECT_ID }}
- name: Configure Docker
run: |
gcloud auth configure-docker
- name: Build with Google Cloud Build
run: |
gcloud builds submit --tag gcr.io/${{ secrets.GCP_PROJECT_ID }}/raight-move-backend:$GITHUB_SHA
- name: Deploy to Cloud Run
run: |
gcloud run deploy raight-move-backend \
--image gcr.io/${{ secrets.GCP_PROJECT_ID }}/raight-move-backend:$GITHUB_SHA \
--platform managed \
--region ${{ secrets.GCP_REGION }} \
--allow-unauthenticated