diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 094fd879..79cdd9d5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -9,6 +9,10 @@ jobs: runs-on: ubuntu-latest + environment: + name: testnet + url: https://testnet.manager.rns.rifos.org/ + steps: - name: Checkout uses: actions/checkout@v2 @@ -22,7 +26,9 @@ jobs: run: yarn - name: Build site - run: yarn build:testnet + run: | + export REACT_APP_GIT_HASH=${{ github.sha }} + yarn build:testnet - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 @@ -43,6 +49,10 @@ jobs: runs-on: ubuntu-latest + environment: + name: mainnet + url: https://manager.rns.rifos.org/ + steps: - name: Checkout uses: actions/checkout@v2 @@ -56,7 +66,9 @@ jobs: run: yarn - name: Build site - run: yarn build:mainnet + run: | + export REACT_APP_GIT_HASH=${{ github.sha }} + yarn build:mainnet - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 diff --git a/.github/workflows/gh-deploy.yml b/.github/workflows/gh-deploy.yml index 99fe793e..c612fe1a 100644 --- a/.github/workflows/gh-deploy.yml +++ b/.github/workflows/gh-deploy.yml @@ -30,6 +30,7 @@ jobs: - name: Install and Build for Testnet 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built. run: | yarn install --network-timeout 100000 || yarn install --network-timeout 100000 || yarn install --network-timeout 100000 + export REACT_APP_GIT_HASH=${{ github.sha }} yarn build:ghpages - name: Deploy 🚀 diff --git a/.github/workflows/qa-deploy.yml b/.github/workflows/qa-deploy.yml index 09b4e989..84d64bcf 100644 --- a/.github/workflows/qa-deploy.yml +++ b/.github/workflows/qa-deploy.yml @@ -22,7 +22,9 @@ jobs: run: yarn - name: Build site - run: yarn build:mainnet + run: | + export REACT_APP_GIT_HASH=${{ github.sha }} + yarn build:mainnet - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 diff --git a/src/app/components/FooterComponent.js b/src/app/components/FooterComponent.js index 490b3ba2..0ee0b353 100644 --- a/src/app/components/FooterComponent.js +++ b/src/app/components/FooterComponent.js @@ -80,6 +80,7 @@ const FooterComponent = (props) => { {`Copyright © ${new Date().getFullYear()} `} RootstockLabs. All rights reserved. {` ${version}`} + {process.env.REACT_APP_GIT_HASH && ` (${process.env.REACT_APP_GIT_HASH.slice(0, 7)})`}