Skip to content

Commit

Permalink
feat(ci/cd): deploy prod
Browse files Browse the repository at this point in the history
  • Loading branch information
lindtvedtsebastian committed Sep 15, 2023
1 parent f74ebd8 commit aabbe89
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 49 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/deploy_beta_prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy Beta prod

on:
workflow_dispatch:

env:
PROJECT_ID: ${{ secrets.BETA_PROD_ID }}
RUN_REGION: ${{ secrets.BETA_RUN_REGION }}
ENABLED_FEATURES: ${{ secrets.ENABLED_FEATURES }}

jobs:
deploy-prod:
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_PROD }}"

- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
with:
version: '>= 363.0.0'
project_id: "${{ secrets.BETA_PROD_ID }}"

- name: 'Build container image'
run: 'gcloud builds submit --tag eu.gcr.io/$PROJECT_ID/$PROJECT_ID:$GITHUB_SHA'

- name: 'Deploy'
run: >
gcloud run deploy $PROJECT_ID --image eu.gcr.io/$PROJECT_ID/$PROJECT_ID:$GITHUB_SHA
--region $RUN_REGION --set-env-vars=ENABLED_FEATURES=$ENABLED_FEATURES
3 changes: 1 addition & 2 deletions .github/workflows/deploy_beta_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,4 @@ jobs:
- name: 'Deploy'
run: >
gcloud run deploy $PROJECT_ID --image eu.gcr.io/$PROJECT_ID/$PROJECT_ID:$GITHUB_SHA
--set-secrets=SERVICE_ACCOUNT=SERVICE_ACCOUNT:latest --region $RUN_REGION
--set-env-vars=ENABLED_FEATURES=$ENABLED_FEATURES
--region $RUN_REGION --set-env-vars=ENABLED_FEATURES=$ENABLED_FEATURES
28 changes: 0 additions & 28 deletions .github/workflows/deploy_next_tavla_staging.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/preview-channel.yml

This file was deleted.

0 comments on commit aabbe89

Please sign in to comment.