From 718cd98eceeb5e42e27c51bb018a0e27e66faaee Mon Sep 17 00:00:00 2001
From: Jesse Clark
Date: Fri, 9 Jan 2026 12:28:59 +0200
Subject: [PATCH 1/2] See current version deployed
- take github hash and store as an env variable
- output it into the footer
---
.github/workflows/deploy.yml | 8 ++++++--
.github/workflows/gh-deploy.yml | 1 +
.github/workflows/qa-deploy.yml | 4 +++-
src/app/components/FooterComponent.js | 1 +
4 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 094fd879..6452be09 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -22,7 +22,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
@@ -56,7 +58,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)})`}
From 50057efac4965ac1ef34b0540cbdbbf8b2227e47 Mon Sep 17 00:00:00 2001
From: Jesse Clark
Date: Fri, 9 Jan 2026 12:42:20 +0200
Subject: [PATCH 2/2] Add environment to workflow file.
---
.github/workflows/deploy.yml | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 6452be09..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
@@ -45,6 +49,10 @@ jobs:
runs-on: ubuntu-latest
+ environment:
+ name: mainnet
+ url: https://manager.rns.rifos.org/
+
steps:
- name: Checkout
uses: actions/checkout@v2