feat: redeploy testnet prod (#204) #126
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
name: Deploy S3 Assets | |
on: | |
push: | |
branches: [main] | |
jobs: | |
terraform-deploy-assets: | |
env: | |
CF_DISTRIBUTION_ID: E1W1OZ8FEAK8E7 | |
runs-on: ubuntu-latest | |
name: Deploy file to s3 + cloudfront | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-2 | |
- name: Filter empty domain ids | |
run: cat crossChain.json | jq 'del(.[] | select(.chainId == null))' > crossChain.tmp && mv -f crossChain.tmp crossChain.json | |
- name: Terraform Plan | |
run: terraform init | |
- name: Terraform Plan | |
run: terraform plan | |
- name: Terraform Deploy | |
run: terraform apply -auto-approve | |
- name: Invalidate Cloudfront Distribution | |
run: aws cloudfront create-invalidation --distribution-id $CF_DISTRIBUTION_ID --paths '/chaindata.json' |