Skip to content

changed to cloud run #5

changed to cloud run

changed to cloud run #5

name: Deploy to Cloud Run on merge
on:
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "23"
- name: Install dependencies
run: npm install
- name: Run build
run: npm run build:prod
# - name: Setup Google Cloud SDK
# uses: google-github-actions/setup-gcloud@v4
# with:
# service_account_key: ${{ secrets.GCP_SA_KEY }}
# project_id: ${{ secrets.GCP_PROJECT_ID }}
# export_default_credentials: true
# - name: Build and Deploy to Cloud Run
# run: |
# gcloud builds submit --tag gcr.io/${{ secrets.GCP_PROJECT_ID }}/your-image-name
# gcloud run deploy your-service-name \
# --image gcr.io/${{ secrets.GCP_PROJECT_ID }}/your-image-name \
# --platform managed \
# --region your-region \
# --allow-unauthenticated