diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 41c9e936..415e45aa 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -35,25 +35,25 @@ jobs: with: node-version: ${{ env.NODE_VERSION }} -# - name: 'Cache NPM dependencies' -# uses: pat-s/always-upload-cache@v2.1.5 -# with: -# path: | -# **/node_modules -# key: ${{ runner.OS }}-npm-cache-${{ hashFiles('packages/*/package-lock.json') }} -# restore-keys: | -# ${{ runner.OS }}-npm-cache- -# -# - name: Install dependencies -# run: | -# npm i -# node_modules/.bin/lerna bootstrap -# -# - name: 'Build' -# run: | -# npm run types:build -# npm run analyzer:build -# npm run frontend:build:prod + - name: 'Cache NPM dependencies' + uses: pat-s/always-upload-cache@v2.1.5 + with: + path: | + **/node_modules + key: ${{ runner.OS }}-npm-cache-${{ hashFiles('packages/*/package-lock.json') }} + restore-keys: | + ${{ runner.OS }}-npm-cache- + + - name: Install dependencies + run: | + npm i + node_modules/.bin/lerna bootstrap + + - name: 'Build' + run: | + npm run types:build + npm run analyzer:build + npm run frontend:build:prod - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v2 @@ -64,8 +64,6 @@ jobs: - name: 'Deploy' run: | - mkdir -p packages/frontend/build - echo "hi" > packages/frontend/build/index.html aws s3 sync packages/frontend/build s3://${BUCKET_NAME}/${PREFIX} --delete --exact-timestamps - name: Assume role on main AWS account diff --git a/packages/infra/ci-roles.yml b/packages/infra/ci-roles.yml index b8140cd9..5b3c9da7 100644 --- a/packages/infra/ci-roles.yml +++ b/packages/infra/ci-roles.yml @@ -11,8 +11,6 @@ Parameters: Type: String CloudfrontInvalidationRoleArn: Type: String - MainCloudformationStackArn: - Type: String Resources: CIFrontendDeployRole: @@ -50,11 +48,11 @@ Resources: Action: - cloudformation:DescribeStacks Resource: - - !Ref MainCloudformationStackArn - - Effect: Allow - Action: - - sts:AssumeRole - Resource: !Ref CloudfrontInvalidationRoleArn + - !Sub arn:aws:cloudformation:${AWS::Region}:${AWS::AccountId}:stack/evm-transaction-trace-stage/* +# - Effect: Allow +# Action: +# - sts:AssumeRole +# Resource: !Ref CloudfrontInvalidationRoleArn CITranasctionTraceDeployRole: Type: AWS::IAM::Role diff --git a/packages/infra/template.yml b/packages/infra/template.yml index 8b9e487a..321a4069 100644 --- a/packages/infra/template.yml +++ b/packages/infra/template.yml @@ -80,4 +80,3 @@ Resources: FrontendBucketName: !Ref FrontendBucketName GhOIDCProviderArn: !Ref GhOIDCProviderArn CloudfrontInvalidationRoleArn: !Ref CloudfrontInvalidationRoleArn - MainCloudformationStackArn: !Ref AWS::StackId