Skip to content

Commit

Permalink
deploy to gcp
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed May 24, 2024
1 parent c37e4f7 commit d420b79
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/deploy-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy Service

on:
workflow_call:
secrets:
GCP_CREDENTIALS:
description: "The JSON credentials used to access GCP."
required: true

jobs:
deploy:
runs-on: ubuntu-latest
# if: github.ref_name == 'production' || github.ref_name == 'development' || github.ref_name == 'staging'
environment: ${{ github.ref_name }}
steps:
- name: 🛫 Checkout
uses: actions/checkout@v4

# https://mikefarah.gitbook.io/yq/
- name: 🖊️ Configure App Deployment
uses: mikefarah/yq@master
with:
cmd: |
name=${{ github.repository }}
name=${name#"ocadotechnology/codeforelife-"}
yq -i '
.service = "${{ github.ref_name }}-$name"
' app.yaml
- name: 🚀 Deploy App on GCloud
uses: ocadotechnology/codeforlife-workspace/.github/actions/gcloud/deploy-app@configure_js_services # TODO: set to @main
with:
gcp-credentials: ${{ secrets.GCP_CREDENTIALS }}

0 comments on commit d420b79

Please sign in to comment.