Skip to content

Commit

Permalink
Merge pull request #1 from juan-rsk/CD
Browse files Browse the repository at this point in the history
CD added
  • Loading branch information
pmprete committed May 6, 2021
2 parents 44a672c + 3fcf557 commit 5d521fe
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/mainnet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "UI deploy MainNet"
on:
release:
types: [released]

jobs:
deploy-mainnet:
name: Deploy to MainNet site
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.MAINNET_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.MAINNET_AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.MAINNET_AWS_REGION }}
- name: Deploy site to S3
run: |
aws s3 sync --delete --only-show-errors public/ ${{ secrets.MAINNET_S3_BUCKET }}
- name: Invalidate CloudFront cache
run: |
aws cloudfront create-invalidation --distribution-id ${{ secrets.MAINNET_CLOUDFRONT_DISTRIBUTION }} --paths "/*"
23 changes: 23 additions & 0 deletions .github/workflows/testnet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "UI deploy TestNet"
on:
release:
types: [published]
jobs:
deploy-testnet:
name: Deploy to TestNet site
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.TESTNET_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.TESTNET_AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.TESTNET_AWS_REGION }}
- name: Deploy site to S3
run: |
aws s3 sync --delete --only-show-errors public/ ${{ secrets.MAINNET_S3_BUCKET }}
- name: Invalidate CloudFront cache
run: |
aws cloudfront create-invalidation --distribution-id ${{ secrets.TESTNET_CLOUDFRONT_DISTRIBUTION }} --paths "/*"

0 comments on commit 5d521fe

Please sign in to comment.