diff --git a/.github/workflows/deploy-ewc.yml b/.github/workflows/deploy-ewc.yml index 9e179d8b..17bfb9f4 100644 --- a/.github/workflows/deploy-ewc.yml +++ b/.github/workflows/deploy-ewc.yml @@ -98,17 +98,20 @@ jobs: env: REVIEW_FEATURE_URL: https://pr${{ github.event.number }}--${{ env.REPO_NAME_ALPHANUMERIC }}.review.gnosisdev.com + - 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: ${{ secrets.AWS_DEFAULT_REGION }} + # Script to deploy to development environment - # xDai build is never created in development branch + # EWC build is never created in development branch # Script to deploy to staging environment - name: 'Deploy to S3: Staging' - run: bash ./scripts/github/deploy_to_s3_bucket.sh if: github.ref == 'refs/heads/master' - env: - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - BUCKET_NAME: ${{ env.STAGING_BUCKET_NAME }} + run: aws s3 sync build s3://${{ secrets.STAGING_BUCKET_NAME }}/current/app --delete # Script to upload release files - run: bash ./scripts/github/deploy_release.sh diff --git a/.github/workflows/deploy-mainnet.yml b/.github/workflows/deploy-mainnet.yml index 397ea93f..a5c660f2 100644 --- a/.github/workflows/deploy-mainnet.yml +++ b/.github/workflows/deploy-mainnet.yml @@ -76,20 +76,23 @@ jobs: REACT_APP_INTERCOM_ID: ${{ secrets.REACT_APP_INTERCOM_ID }} REACT_APP_IPFS_GATEWAY: ${{ secrets.REACT_APP_IPFS_GATEWAY }} + - 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: ${{ secrets.AWS_DEFAULT_REGION }} + # Script to deploy Pull Requests # Mainnet build is never created in Pull Requests # Script to deploy to development environment # Mainnet build is never created in development branch - # Script to deploy to staging environment + # Script to deploy to staging environment - name: 'Deploy to S3: Staging' - run: bash ./scripts/github/deploy_to_s3_bucket.sh - if: github.ref == 'refs/heads/master' - env: - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - BUCKET_NAME: ${{ env.STAGING_BUCKET_NAME }} + if: github.ref == 'refs/heads/master' # Or refs/heads/main + run: aws s3 sync build s3://${{ secrets.STAGING_BUCKET_NAME }}/current/app --delete # Script to upload release files - run: bash ./scripts/github/deploy_release.sh diff --git a/.github/workflows/deploy-rinkeby.yml b/.github/workflows/deploy-rinkeby.yml index ced37b34..10121e3d 100644 --- a/.github/workflows/deploy-rinkeby.yml +++ b/.github/workflows/deploy-rinkeby.yml @@ -80,6 +80,13 @@ jobs: REACT_APP_INTERCOM_ID: ${{ secrets.REACT_APP_INTERCOM_ID }} REACT_APP_IPFS_GATEWAY: ${{ secrets.REACT_APP_IPFS_GATEWAY }} + - 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: ${{ secrets.AWS_DEFAULT_REGION }} + # Script to deploy Pull Requests - run: bash ./scripts/github/deploy_pull_request.sh if: success() && github.event.number @@ -105,21 +112,13 @@ jobs: # Script to deploy to development environment - name: 'Deploy to S3: Develop' - run: bash ./scripts/github/deploy_to_s3_bucket.sh - if: github.ref == 'refs/heads/development' - env: - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - BUCKET_NAME: ${{ secrets.AWS_DEV_BUCKET_NAME }} + if: github.ref == 'refs/heads/develop' + run: aws s3 sync build s3://${{ secrets.AWS_DEV_BUCKET_NAME }}/app --delete # Script to deploy to staging environment - name: 'Deploy to S3: Staging' - run: bash ./scripts/github/deploy_to_s3_bucket.sh if: github.ref == 'refs/heads/master' - env: - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - BUCKET_NAME: ${{ env.STAGING_BUCKET_NAME }} + run: aws s3 sync build s3://${{ secrets.STAGING_BUCKET_NAME }}/current/app --delete # Script to upload release files - run: bash ./scripts/github/deploy_release.sh diff --git a/.github/workflows/deploy-volta.yml b/.github/workflows/deploy-volta.yml index 02228c66..a615e399 100644 --- a/.github/workflows/deploy-volta.yml +++ b/.github/workflows/deploy-volta.yml @@ -101,17 +101,21 @@ jobs: env: REVIEW_FEATURE_URL: https://pr${{ github.event.number }}--${{ env.REPO_NAME_ALPHANUMERIC }}.review.gnosisdev.com + - 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: ${{ secrets.AWS_DEFAULT_REGION }} + + # Script to deploy to development environment - # xDai build is never created in development branch + # Volta build is never created in development branch # Script to deploy to staging environment - name: 'Deploy to S3: Staging' - run: bash ./scripts/github/deploy_to_s3_bucket.sh if: github.ref == 'refs/heads/master' - env: - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - BUCKET_NAME: ${{ env.STAGING_BUCKET_NAME }} + run: aws s3 sync build s3://${{ secrets.STAGING_BUCKET_NAME }}/current/app --delete # Script to upload release files - run: bash ./scripts/github/deploy_release.sh diff --git a/.github/workflows/deploy-xdai.yml b/.github/workflows/deploy-xdai.yml index ac5e70ca..0cd02f90 100644 --- a/.github/workflows/deploy-xdai.yml +++ b/.github/workflows/deploy-xdai.yml @@ -101,17 +101,20 @@ jobs: env: REVIEW_FEATURE_URL: https://pr${{ github.event.number }}--${{ env.REPO_NAME_ALPHANUMERIC }}.review.gnosisdev.com + - 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: ${{ secrets.AWS_DEFAULT_REGION }} + # Script to deploy to development environment # xDai build is never created in development branch # Script to deploy to staging environment - name: 'Deploy to S3: Staging' - run: bash ./scripts/github/deploy_to_s3_bucket.sh if: github.ref == 'refs/heads/master' - env: - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - BUCKET_NAME: ${{ env.STAGING_BUCKET_NAME }} + run: aws s3 sync build s3://${{ secrets.STAGING_BUCKET_NAME }}/current/app --delete # Script to upload release files - run: bash ./scripts/github/deploy_release.sh