Skip to content

Deploy Beta staging #114

Deploy Beta staging

Deploy Beta staging #114

name: Deploy Beta staging
on:
workflow_dispatch:
push:
branches:
- master
paths:
- "next-tavla/**"
env:
PROJECT_ID: ${{ secrets.BETA_STAGING_ID }}
RUN_REGION: ${{ secrets.BETA_RUN_REGION }}
jobs:
deploy-staging:
runs-on: ubuntu-latest
defaults:
run:
working-directory: next-tavla
steps:
- uses: actions/checkout@v3
- uses: "google-github-actions/auth@v1"
with:
credentials_json: "${{ secrets.DEPLOY_BETA_STAGING }}"
- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v1"
with:
version: ">= 363.0.0"
project_id: "${{ secrets.BETA_STAGING_ID }}"
- name: "Project who?"
run: |
echo $PROJECT_ID > tmp.txt
cat tmp.txt
gcloud auth list
- name: "Build container image"
run: "gcloud builds submit . --substitutions _ENV=dev,COMMIT_SHA=$GITHUB_SHA"
- name: "Deploy"
run: >
gcloud run deploy $PROJECT_ID --image eu.gcr.io/$PROJECT_ID/$PROJECT_ID:$GITHUB_SHA
--region $RUN_REGION --service-account="application@ent-tavla-dev.iam.gserviceaccount.com" --allow-unauthenticated