Skip to content

added log for debugging #3

added log for debugging

added log for debugging #3

name: Deploy to Cloud Run on merge
on:
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Server-specific steps
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1
- name: Configure Docker for GCR
run: gcloud auth configure-docker
- name: Build and push Docker image
working-directory: ./server
run: |
gcloud builds submit --tag gcr.io/webnote-df968/webnote
- name: Deploy to Cloud Run
run: |
gcloud run deploy webnote \
--image gcr.io/webnote-df968/webnote \
--region europe-west3 \
--allow-unauthenticated \
--set-env-vars FLASK_SECRET_KEY=${{ secrets.FLASK_SECRET_KEY }} \
--set-env-vars FLASK_DEBUG=false