Skip to content

Workflow file for this run

name: 'Deploy to prod'
on:
release:
types:
- created
env:
NODE_VERSION: 18.16.0
ENV: prod
AWS_EC2_METADATA_DISABLED: true
jobs:
frontend_deploy_prod:
runs-on: ubuntu-20.04
timeout-minutes: 15
env:
BUCKET_NAME: www.rumblefish.dev.evmdebugger
PREFIX: evm-debugger
if: |
startsWith(github.ref, 'refs/tags/@evm-debuger/frontend') &&
!contains(github.ref, '-alpha.')
permissions:
id-token: write
contents: read
steps:
- name: 'Checkout'
uses: actions/[email protected]
- uses: actions/setup-node@master
with:
node-version: ${{ env.NODE_VERSION }}
- name: 'Cache NPM dependencies'
uses: pat-s/[email protected]
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
with:
role-to-assume: arn:aws:iam::045028348791:role/www.rumblefish.dev.evmdebugger-github-workflow
aws-region: us-east-1
role-session-name: ${{ github.event.repository.name }}-${{ github.job }}
- name: 'Deploy'
run: |
aws s3 sync packages/frontend/build s3://${BUCKET_NAME}/${PREFIX} --delete --exact-timestamps
aws cloudfront create-invalidation --distribution-id ${DISTRIBUTION_ID} --paths "/${PREFIX}/*"
env:
DISTRIBUTION_ID: E3IK5XITYN78AJ
transaction_trace_deploy_prod:
runs-on: ubuntu-20.04
if: |
startsWith(github.ref, 'refs/tags/@evm-debuger/transaction-trace') &&
!contains(github.ref, '-alpha.')
permissions:
id-token: write
contents: read
steps:
- name: 'Checkout'
uses: actions/[email protected]
- uses: actions/setup-node@master
with:
node-version: ${{ env.NODE_VERSION }}
- name: 'Cache NPM dependencies'
uses: pat-s/[email protected]
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
npm install jq.node -g
lerna bootstrap
- name: Build
run: |
npm run types:build
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::045028348791:role/evm-debugger-github-workflow-prod
aws-region: us-east-1
role-session-name: ${{ github.event.repository.name }}-${{ github.job }}
- name: Deploy stack
working-directory: ./packages/infra
run: |
make prod-deploy