Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Merge pull request #2839 from teamleadercrm/release-25.0.4 #86

Merge pull request #2839 from teamleadercrm/release-25.0.4

Merge pull request #2839 from teamleadercrm/release-25.0.4 #86

Workflow file for this run

---
name: Continuous Integration
on:
push:
branches:
- next-release
concurrency:
group: ${{ github.ref }}
jobs:
lint-node:
uses: ./.github/workflows/lint-node.yaml
secrets: inherit
test-node:
uses: ./.github/workflows/test-node.yaml
secrets: inherit
check-types:
uses: ./.github/workflows/check-types.yaml
secrets: inherit
deploy-components:
if: ${{ always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
runs-on: ubuntu-latest
needs: [check-types, lint-node, test-node]
permissions:
id-token: write
contents: read
environment: production
env:
env: production
steps:
- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Set env
run: cat env/${{ env.env }}/build.env >> $GITHUB_ENV
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
aws-region: eu-west-1
role-to-assume: ${{ env.IAM_ROLE }}
- name: Set AWS Credentials file
shell: bash
run: |
aws configure set aws_session_token ${{ env.AWS_SESSION_TOKEN }} --profile ${{ env.AWS_PROFILE }}
aws configure set aws_access_key_id ${{ env.AWS_ACCESS_KEY_ID }} --profile ${{ env.AWS_PROFILE }}
aws configure set aws_secret_access_key ${{ env.AWS_SECRET_ACCESS_KEY }} --profile ${{ env.AWS_PROFILE }}
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: '16'
cache: 'yarn'
- name: Build
run: |
yarn && yarn deploy:${{ env.YARN_BUILD }}
- name: Deploy
run: aws s3 sync ./dist s3://${{ env.S3_BUCKET }} --profile ${{ env.AWS_PROFILE }}
- name: Invalidate CloudFront
run: aws cloudfront create-invalidation --distribution-id ${{ env.DISTRIBUTION_ID }} --paths '/*'