added log for debugging #3
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: 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 |