diff --git a/.github/workflows/cloudrun.yml b/.github/workflows/cloudrun.yml new file mode 100644 index 0000000..fa11269 --- /dev/null +++ b/.github/workflows/cloudrun.yml @@ -0,0 +1,33 @@ +name: Deploy to Google Cloud Run + +on: + push: + branches: + - main + +env: + PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} + +jobs: + build-deploy: + name: Build and Deploy + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Authenticate with Google Cloud + 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: Deploy to Cloud Run + run: | + gcloud run deploy bastienlaw.com \ + --region useast1 \ + --source .\app\ \ + --allow-unauthenticated