Skip to content

Feat/use glob template files (#301) #58

Feat/use glob template files (#301)

Feat/use glob template files (#301) #58

Workflow file for this run

on:
push:
branches:
- main
name: 🚀 Deploy to staging
concurrency: deploy_staging
permissions:
id-token: write # this is required for AWS https://github.com/aws-actions/configure-aws-credentials#usage
contents: read # this is required for Nx https://github.com/nrwl/nx-set-shas#permissions-in-v2
actions: read # this is required for Nx https://github.com/nrwl/nx-set-shas#permissions-in-v2
env:
CI: true
AWS_REGION: eu-west-2
defaults:
run:
shell: bash
jobs:
build_and_test_web_app:
runs-on: ubuntu-latest
defaults:
run:
working-directory: services/web-app
shell: bash
env:
CI: true
AWS_REGION: eu-west-2
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v3
with:
node-version: 18
cache: "npm"
cache-dependency-path: "**/package-lock.json"
# TODO: uncomment commented code- when we configure AWS credentials, we currently get the error 'Could not assume role with OIDC: Not authorized to perform sts:AssumeRoleWithWebIdentity'
# - name: Configure AWS Credentials
# uses: aws-actions/configure-aws-credentials@v3
# with:
# aws-region: ${{ env.AWS_REGION }}
# role-to-assume: ${{ secrets.AWS_ROLE_ARN_STAGING }}
# - name: 🚀 Deploy web-app
# run: npm i && npm run deploy-staging
build_and_test_core:
runs-on: ubuntu-latest
env:
CI: true
AWS_REGION: eu-west-2
defaults:
run:
working-directory: services/core
shell: bash
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v3
with:
node-version: 18
cache: "npm"
cache-dependency-path: "**/package-lock.json"
# - name: Configure AWS Credentials
# uses: aws-actions/configure-aws-credentials@v3
# with:
# aws-region: ${{ env.AWS_REGION }}
# role-to-assume: ${{ secrets.AWS_ROLE_ARN_STAGING }}
# - name: 🚀 Deploy core
# run: npm i && npm run deploy-staging