Update merge.yml #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-deploy: | |
name: 🏗 Build Project & 🚀 Deploy | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
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" | |
- name: Install dependencies | |
run: npm ci | |
- 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: cd services/core && npm run deploy-staging | |
- name: 🚀 Deploy web-app | |
run: cd services/web-app && npm run deploy-staging |