Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 54 additions & 3 deletions .github/workflows/client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ jobs:

- name: Capture Environment Variables
run: |
echo VITE_AUTH_LOGIN_URL=${{ secrets.STAGING_AUTH_URL }} > .env
echo VITE_AUTH_PROJECT_ID=${{ secrets.STAGING_AUTH_PROJECT_ID }} >> .env
echo VITE_GRAPHQL_ENDPOINT=${{ secrets.STAGING_GRAPHQL_ENDPOINT }} >> .env
echo VITE_ASL_LEXICON_ID=${{ secrets.STAGING_ASL_LEXICON_ID }} >> .env
echo VITE_NAME=${{ secrets.STAGING_ASL_LEX_NAME }} >> .env
Expand All @@ -108,10 +106,63 @@ jobs:
workload_identity_provider: ${{ secrets.GCP_STAGING_ID_PROVIDER }}
service_account: ${{ secrets.STAGING_GCP_SERVICE_ACCOUNT }}


- name: Upload Files
uses: 'google-github-actions/upload-cloud-storage@v2'
with:
path: packages/client/dist/
destination: ${{ secrets.GCP_FRONTEND_BUCKET }}
parent: false

eu-prod-deploy:
runs-on: ubuntu-latest
name: Deploy to EU Prod
needs: [lint, build]
permissions:
contents: 'read'
id-token: 'write'
if: startsWith(github.ref, 'refs/tags/v')
defaults:
run:
working-directory: packages/client

steps:
- name: Checkout Repository
uses: actions/checkout@v3

# App Engine deploy logic does not play well with
- name: Cleanup
run: rm package-lock.json

- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 18

- name: Capture Environment Variables
run: |
echo VITE_GRAPHQL_ENDPOINT=${{ secrets.PROD_EU_GRAPHQL_ENDPOINT }} >> .env
echo VITE_ASL_LEXICON_ID=${{ secrets.PROD_EU_ASL_LEXICON_ID }} >> .env
echo VITE_NAME=${{ secrets.PROD_EU_ASL_LEX_NAME }} >> .env
echo VITE_AUTH_API_KEY=${{ secrets.PROD_EU_AUTH_API_KEY }} >> .env
echo VITE_AUTH_DOMAIN=${{ secrets.PROD_EU_AUTH_DOMAIN }} >> .env

- name: NPM Install
run: npm install
shell: bash

- name: Build
run: npm run build

- name: GCP Auth
uses: 'google-github-actions/auth@v2'
with:
project_id: ${{ secrets.GCP_PROD_EU_PROJECT_ID }}
workload_identity_provider: ${{ secrets.GCP_PROD_EU_ID_PROVIDER }}
service_account: ${{ secrets.PROD_EU_GCP_SERVICE_ACCOUNT }}

- name: Upload Files
uses: 'google-github-actions/upload-cloud-storage@v2'
with:
path: packages/client/dist/
destination: ${{ secrets.PROD_EU_GCP_FRONTEND_BUCKET }}
parent: false
35 changes: 35 additions & 0 deletions .github/workflows/gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,38 @@ jobs:
SIGNLAB_URI=${{ secrets.STAGING_SIGNLAB_URI }}
LEX_URI=${{ secrets.STAGING_LEX_URI }}
AUTH_URI=${{ secrets.STAGING_AUTH_URI }}

eu-prod-deploy:
runs-on: ubuntu-latest
name: Deploy to Staging
needs: [lint, build]
permissions:
contents: 'read'
id-token: 'write'
if: startsWith(github.ref, 'refs/tags/v')
defaults:
run:
working-directory: packages/gateway
steps:
- name: Checkout Repository
uses: actions/checkout@v3

# App Engine deploy logic does not play well with
- name: Cleanup
run: rm package-lock.json

- name: GCP Auth
uses: 'google-github-actions/auth@v2'
with:
project_id: ${{ secrets.GCP_PROD_EU_PROJECT_ID }}
workload_identity_provider: ${{ secrets.GCP_PROD_EU_ID_PROVIDER }}
service_account: ${{ secrets.PROD_EU_GCP_SERVICE_ACCOUNT }}

- name: Deploy to Staging
uses: 'google-github-actions/deploy-appengine@v2'
with:
working_directory: 'packages/gateway'
env_vars: |-
SIGNLAB_URI=${{ secrets.PROD_EU_SIGNLAB_URI }}
LEX_URI=${{ secrets.PROD_EU_LEX_URI }}
AUTH_URI=${{ secrets.PROD_EU_AUTH_URI }}
39 changes: 39 additions & 0 deletions .github/workflows/server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,42 @@ jobs:
CASBIN_MONGO_URI=${{ secrets.STAGING_CASBIN_MONGO_URI }}
ZIP_JOB_NAME=${{ secrets.GCP_ZIP_JOB_STAGING }}
GATEWAY_ENDPOINT=${{ secrets.STAGING_GRAPHQL_ENDPOINT }}

eu-prod-deploy:
runs-on: ubuntu-latest
name: Deploy to Staging
needs: [lint, build]
permissions:
contents: 'read'
id-token: 'write'
if: startsWith(github.ref, 'refs/tags/v')
defaults:
run:
working-directory: packages/server

steps:
- name: Checkout Repository
uses: actions/checkout@v3

# App Engine deploy logic does not play well with
- name: Cleanup
run: rm package-lock.json

- name: GCP Auth
uses: 'google-github-actions/auth@v2'
with:
project_id: ${{ secrets.GCP_PROD_EU_PROJECT_ID }}
workload_identity_provider: ${{ secrets.GCP_PROD_EU_ID_PROVIDER }}
service_account: ${{ secrets.PROD_EU_GCP_SERVICE_ACCOUNT }}

- name: Deploy to Staging
uses: 'google-github-actions/deploy-appengine@v2'
with:
working_directory: 'packages/server'
env_vars: |-
MONGO_URI=${{ secrets.PROD_EU_MONGO_URI }}
CASBIN_MONGO_URI=${{ secrets.PROD_EU_CASBIN_MONGO_URI }}
ZIP_JOB_NAME=${{ secrets.GCP_ZIP_JOB_PROD_EU }}
GATEWAY_ENDPOINT=${{ secrets.PROD_EU_GRAPHQL_ENDPOINT }}